| Modifier and Type | Field and Description |
|---|---|
| private Closeable | closable
Underlying stream for SAXResult, StAXResult, and StreamResult. |
| private DOMResult | |
| private static final EntityResolver | |
| private static final URIResolver | |
| private static final Map |
| Access | Constructor and Description |
|---|---|
| public | JdbcSQLXML(JdbcConnection
to use conn, Value for this JdbcSQLXML value, JdbcLob.of the LOB state,of the trace object id)INTERNAL |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | checkReadable()
Overrides org. Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read). |
| public InputStream | getBinaryStream()
Overrides org. Implements java. Retrieves the XML value designated by this SQLXML instance as a stream. |
| public Reader | getCharacterStream()
Overrides org. Implements java. Retrieves the XML value designated by this SQLXML instance as a java.io.Reader object. |
| public <T extends Source> T | getSource(Class<T>
The class of the source, or null.
If the class is null, a vendor specific Source implementation will be returned.
The following classes are supported at a minimum:
sourceClass)javax.xml.transform.dom.DOMSource - returns a DOMSource javax.xml.transform.sax.SAXSource - returns a SAXSource javax.xml.transform.stax.StAXSource - returns a StAXSource javax.xml.transform.stream.StreamSource - returns a StreamSource Implements java. Returns a Source for reading the XML value designated by this SQLXML instance. |
| public String | getString()
Implements java. Returns a string representation of the XML value designated by this SQLXML instance. |
| public OutputStream | setBinaryStream()
Implements java. Retrieves a stream that can be used to write the XML value that this SQLXML instance represents. |
| public Writer | setCharacterStream()
Implements java. Retrieves a stream to be used to write the XML value that this SQLXML instance represents. |
| public <T extends Result> T | setResult(Class<T>
The class of the result, or null.
If resultClass is null, a vendor specific Result implementation will be returned.
The following classes are supported at a minimum:
resultClass)javax.xml.transform.dom.DOMResult - returns a DOMResult javax.xml.transform.sax.SAXResult - returns a SAXResult javax.xml.transform.stax.StAXResult - returns a StAXResult javax.xml.transform.stream.StreamResult - returns a StreamResult Implements java. Returns a Result for setting the XML value designated by this SQLXML instance. |
| public void | setString(String
the XML value value)Implements java. Sets the XML value designated by this SQLXML instance to the given String representation. |
| closable | back to summary |
|---|---|
| private Closeable closable Underlying stream for SAXResult, StAXResult, and StreamResult. | |
| domResult | back to summary |
|---|---|
| private DOMResult domResult | |
| NOOP_ENTITY_RESOLVER | back to summary |
|---|---|
| private static final EntityResolver NOOP_ENTITY_RESOLVER | |
| NOOP_URI_RESOLVER | back to summary |
|---|---|
| private static final URIResolver NOOP_URI_RESOLVER | |
| secureFeatureMap | back to summary |
|---|---|
| private static final Map<String, Boolean> secureFeatureMap | |
| JdbcSQLXML | back to summary |
|---|---|
| public JdbcSQLXML(JdbcConnection conn, Value value, JdbcLob. INTERNAL
| |
| checkReadable | back to summary |
|---|---|
| pack-priv void checkReadable() throws SQLException, IOException Overrides org. Doc from org. Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream() throws SQLException Overrides org. Implements java. Doc from java. Retrieves the XML value designated by this SQLXML instance as a stream. The bytes of the input stream are interpreted according to appendix F of the XML 1.0 specification. The behavior of this method is the same as ResultSet.getBinaryStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation.
| |
| getCharacterStream | back to summary |
|---|---|
| public Reader getCharacterStream() throws SQLException Overrides org. Implements java. Doc from java. Retrieves the XML value designated by this SQLXML instance as a java.io.Reader object. The format of this stream is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the stream is unicode. The behavior of this method is the same as ResultSet.getCharacterStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation.
| |
| getSource | back to summary |
|---|---|
| public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException Implements java. Doc from java. Returns a Source for reading the XML value designated by this SQLXML instance. Sources are used as inputs to XML parsers and XSLT transformers. Sources for XML parsers will have namespace processing on by default. The systemID of the Source is implementation dependent. The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation. Note that SAX is a callback architecture, so a returned SAXSource should then be set with a content handler that will receive the SAX events from parsing. The content handler will receive callbacks based on the contents of the XML. SAXSource saxSource = sqlxml.getSource(SAXSource.class); XMLReader xmlReader = saxSource.getXMLReader(); xmlReader.setContentHandler(myHandler); xmlReader.parse(saxSource.getInputSource());
| |
| getString | back to summary |
|---|---|
| public String getString() throws SQLException Implements java. Doc from java. Returns a string representation of the XML value designated by this SQLXML instance. The format of this String is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the String is unicode. The behavior of this method is the same as ResultSet.getString() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation.
| |
| setBinaryStream | back to summary |
|---|---|
| public OutputStream setBinaryStream() throws SQLException Implements java. Doc from java. Retrieves a stream that can be used to write the XML value that this SQLXML instance represents. The stream begins at position 0. The bytes of the stream are interpreted according to appendix F of the XML 1.0 specification The behavior of this method is the same as ResultSet.updateBinaryStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not writable when this method is called and may also become not readable depending on implementation.
| |
| setCharacterStream | back to summary |
|---|---|
| public Writer setCharacterStream() throws SQLException Implements java. Doc from java. Retrieves a stream to be used to write the XML value that this SQLXML instance represents. The format of this stream is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the stream is unicode. The behavior of this method is the same as ResultSet.updateCharacterStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not writable when this method is called and may also become not readable depending on implementation.
| |
| setResult | back to summary |
|---|---|
| public <T extends Result> T setResult(Class<T> resultClass) throws SQLException Implements java. Doc from java. Returns a Result for setting the XML value designated by this SQLXML instance. The systemID of the Result is implementation dependent. The SQL XML object becomes not writable when this method is called and may also become not readable depending on implementation. Note that SAX is a callback architecture and the returned SAXResult has a content handler assigned that will receive the SAX events based on the contents of the XML. Call the content handler with the contents of the XML document to assign the values. SAXResult saxResult = sqlxml.setResult(SAXResult.class); ContentHandler contentHandler = saxResult.getXMLReader().getContentHandler(); contentHandler.startDocument(); // set the XML elements and attributes into the result contentHandler.endDocument();
| |
| setString | back to summary |
|---|---|
| public void setString(String value) throws SQLException Implements java. Doc from java. Sets the XML value designated by this SQLXML instance to the given String representation. The format of this String is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the String is unicode. The behavior of this method is the same as ResultSet.updateString() when the designated column of the ResultSet has a type java.sql.Types of SQLXML. The SQL XML object becomes not writable when this method is called and may also become not readable depending on implementation.
| |