skip to main content
DataDirect Connect Drivers : DB2 Driver : Returning and Inserting/Updating XML Data : Returning XML Data : Binary Data
  
Binary Data
When XMLDescribeType=blob, the driver returns XML data as binary data. The result set column is described with a column type of BLOB and the column type name is xml.
When XMLDescribeType=blob, your application can use the following methods to return XML data as binary data:
*ResultSet.getBytes()
*ResultSet.getBinaryStream()
*ResultSet.getBlob()
*ResultSet.getObject()
*CallableStatement.getBytes()
*CallableStatement.getBlob()
*CallableStatement.getObject()
The driver does not apply any data conversions to the XML data returned from the database server. These methods return a byte array or binary stream that contains the XML data encoded as UTF-8.
When XMLDescribeType=clob, your application should not use any of the methods for returning binary data described in this section. In this case, the driver applies the standard JDBC binary-to-character conversion to the data, which returns the hexadecimal representation of the binary data.