The com.ibm.db2.jcc.DB2Xml interface is used for declaring Java™ objects for use with the data server's XML data type.
The following method is defined only for the IBM® Data Server Driver for JDBC and SQLJ.
public void closeDB2Xml()
throws SQLException
Releases the resources that are associated with a com.ibm.jcc.DB2Xml object.
public java.io.InputStream getDB2AsciiStream()
throws SQLException
Retrieves data from a DB2Xml object, and converts the data to US-ASCII encoding.
public java.io.InputStream getDB2BinaryStream()
throws SQLException
Retrieves data from a DB2Xml object as a binary stream. The character encoding of the bytes in the binary stream is defined in the XML 1.0 specification.
public byte[] getDB2Bytes()
throws SQLException
Retrieves data from a DB2Xml object as a byte array. The character encoding of the bytes is defined in the XML 1.0 specification.
public java.io.Reader getDB2CharacterStream()
throws SQLException
Retrieves data from a DB2Xml object as a java.io.Reader object.
public String getDB2String()
throws SQLException
Retrieves data from a DB2Xml object as a String value.
public InputStream getDB2XmlAsciiStream()
throws SQLException
Retrieves data from a DB2Xml object, converts the data to US-ASCII encoding, and imbeds an XML declaration with an encoding specification for US-ASCII in the returned data.
public java.io.InputStream getDB2XmlBinaryStream(String targetEncoding)
throws SQLException
Retrieves data from a DB2Xml object as a binary stream, converts the data to targetEncoding, and imbeds an XML declaration with an encoding specification for targetEncoding in the returned data.
public byte[] getDB2XmlBytes(String targetEncoding)
throws SQLException
Retrieves data from a DB2Xml object as a byte array, converts the data to targetEncoding, and imbeds an XML declaration with an encoding specification for targetEncoding in the returned data.
public java.io.Reader getDB2XmlCharacterStream()
throws SQLException
Retrieves data from a DB2Xml object as a java.io.Reader object, converts the data to ISO-10646-UCS-2 encoding, and imbeds an XML declaration with an encoding specification for ISO-10646-UCS-2 in the returned data.
public String getDB2XmlString()
throws SQLException
Retrieves data from a DB2Xml object as a String object, converts the data to ISO-10646-UCS-2 encoding, and imbeds an XML declaration with an encoding specification for ISO-10646-UCS-2 in the returned data.
public boolean isDB2XmlClosed()
throws SQLException
Indicates whether a com.ibm.jcc.DB2Xml object has been closed.