| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private ByteArrayOutputStream | |
| private DOMResult | |
| private SAXResult | |
| private StringWriter | |
| private int | |
| private ExceptionInterceptor | |
| private boolean | |
| private XMLInputFactory | |
| private boolean | |
| private final Lock | |
| private XMLOutputFactory | |
| private ResultSetInternalMethods | |
| private MysqlSQLXML. | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Reader | |
| private void | |
| private void | |
| protected String | |
| public void | free()
Implements java. This method closes this object and releases the resources that it held. |
| public InputStream | getBinaryStream()
Implements java. Retrieves the XML value designated by this SQLXML instance as a stream. |
| public Reader | getCharacterStream()
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:
clazz)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 boolean | |
| protected String | |
| protected Reader | |
| protected String | |
| public OutputStream | setBinaryStream()
Implements java. Retrieves a stream that can be used to write the XML value that this SQLXML instance represents. |
| private OutputStream | |
| public Writer | setCharacterStream()
Implements java. Retrieves a stream to be used to write the XML value that this SQLXML instance represents. |
| private Writer | |
| private static void | |
| 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:
clazz)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 str)Implements java. Sets the XML value designated by this SQLXML instance to the given String representation. |
| asByteArrayOutputStream | back to summary |
|---|---|
| private ByteArrayOutputStream asByteArrayOutputStream | |
| asDOMResult | back to summary |
|---|---|
| private DOMResult asDOMResult | |
| asSAXResult | back to summary |
|---|---|
| private SAXResult asSAXResult | |
| asStringWriter | back to summary |
|---|---|
| private StringWriter asStringWriter | |
| columnIndexOfXml | back to summary |
|---|---|
| private int columnIndexOfXml | |
| exceptionInterceptor | back to summary |
|---|---|
| private ExceptionInterceptor exceptionInterceptor | |
| fromResultSet | back to summary |
|---|---|
| private boolean fromResultSet | |
| inputFactory | back to summary |
|---|---|
| private XMLInputFactory inputFactory | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed | |
| lock | back to summary |
|---|---|
| private final Lock lock | |
| outputFactory | back to summary |
|---|---|
| private XMLOutputFactory outputFactory | |
| owningResultSet | back to summary |
|---|---|
| private ResultSetInternalMethods owningResultSet | |
| saxToReaderConverter | back to summary |
|---|---|
| private MysqlSQLXML. | |
| stringRep | back to summary |
|---|---|
| private String stringRep | |
| workingWithResult | back to summary |
|---|---|
| private boolean workingWithResult | |
| MysqlSQLXML | back to summary |
|---|---|
| public MysqlSQLXML(ResultSetInternalMethods owner, int index, ExceptionInterceptor exceptionInterceptor) | |
| MysqlSQLXML | back to summary |
|---|---|
| public MysqlSQLXML(ExceptionInterceptor exceptionInterceptor) | |
| binaryInputStreamStreamToReader | back to summary |
|---|---|
| private Reader binaryInputStreamStreamToReader(ByteArrayOutputStream out) | |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() throws SQLException | |
| checkWorkingWithResult | back to summary |
|---|---|
| private void checkWorkingWithResult() throws SQLException | |
| domSourceToString | back to summary |
|---|---|
| protected String domSourceToString() throws SQLException | |
| free | back to summary |
|---|---|
| public void free() throws SQLException Implements java. Doc from java. This method closes this object and releases the resources that it held.
The SQL XML object becomes invalid and neither readable or writable
when this method is called.
After
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream() throws SQLException 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 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> clazz) 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.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() throws SQLException | |
| readerToString | back to summary |
|---|---|
| protected String readerToString(Reader reader) throws SQLException | |
| serializeAsCharacterStream | back to summary |
|---|---|
| protected Reader serializeAsCharacterStream() throws SQLException | |
| serializeAsString | back to summary |
|---|---|
| protected String serializeAsString() throws SQLException | |
| 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.
| |
| setBinaryStreamInternal | back to summary |
|---|---|
| private OutputStream setBinaryStreamInternal() throws SQLException | |
| 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.
| |
| setCharacterStreamInternal | back to summary |
|---|---|
| private Writer setCharacterStreamInternal() throws SQLException | |
| setFeature | back to summary |
|---|---|
| private static void setFeature(Object factory, String name, boolean value) | |
| setResult | back to summary |
|---|---|
| public <T extends Result> T setResult(Class<T> clazz) 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 str) 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.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv StringBuilder | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | characters(char[]
The characters. buffer, int The start position in the character array. offset, int The number of characters to use from the
character array. len)Overrides org. Implements org. Receive notification of character data inside an element. |
| public void | |
| public void | |
| public void | endDocument()
Overrides org. Implements org. Receive notification of the end of the document. |
| private void | |
| private void | |
| private void | |
| public void | ignorableWhitespace(char[]
The whitespace characters. ch, int The start position in the character array. start, int The number of characters to use from the
character array. length)Overrides org. Implements org. Receive notification of ignorable whitespace in element content. |
| public void | |
| public void | startDocument()
Overrides org. Implements org. Receive notification of the beginning of the document. |
| public void | startElement(String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. namespaceURI, String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. sName, String The qualified name (with prefix), or the
empty string if qualified names are not available. qName, Attributes The attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object. attrs)Overrides org. Implements org. Receive notification of the start of an element. |
| pack-priv Reader |
| buf | back to summary |
|---|---|
| pack-priv StringBuilder buf | |
| inCDATA | back to summary |
|---|---|
| private boolean inCDATA | |
| SimpleSaxToReader | back to summary |
|---|---|
| pack-priv SimpleSaxToReader() | |
| characters | back to summary |
|---|---|
| public void characters(char[] buffer, int offset, int len) throws SAXException Overrides org. Implements org. Doc from org. Receive notification of character data inside an element. By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).
| |
| comment | back to summary |
|---|---|
| public void comment(char[] ch, int start, int length) throws SAXException | |
| endCDATA | back to summary |
|---|---|
| public void endCDATA() throws SAXException | |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Overrides org. Implements org. Doc from org. Receive notification of the end of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).
| |
| escapeCharsForXml | back to summary |
|---|---|
| private void escapeCharsForXml(String str, boolean isAttributeData) | |
| escapeCharsForXml | back to summary |
|---|---|
| private void escapeCharsForXml(char[] buffer, int offset, int len, boolean isAttributeData) | |
| escapeCharsForXml | back to summary |
|---|---|
| private void escapeCharsForXml(char c, boolean isAttributeData) | |
| ignorableWhitespace | back to summary |
|---|---|
| public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException Overrides org. Implements org. Doc from org. Receive notification of ignorable whitespace in element content. By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).
| |
| startCDATA | back to summary |
|---|---|
| public void startCDATA() throws SAXException | |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Overrides org. Implements org. Doc from org. Receive notification of the beginning of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).
| |
| startElement | back to summary |
|---|---|
| public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException Overrides org. Implements org. Doc from org. Receive notification of the start of an element. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).
| |
| toReader | back to summary |
|---|---|
| pack-priv Reader toReader() | |