Package java.sql
Interface SQLXML
public interface SQLXML
Maps SQL's XML type into Java.
-
Method Summary
Modifier and Type Method Description voidfree()Frees any resources held by this object.InputStreamgetBinaryStream()Returns a stream that can be used to read binary data from this SQLXMLobject.ReadergetCharacterStream()Returns a reader that can be used to read character data from this SQLXMLobject.<T extends Source>
TgetSource(Class<T> sourceClass)Returns aSourcefor reading this object's data.StringgetString()Returns this object's data as an XML string.OutputStreamsetBinaryStream()Returns a stream that can be used to write binary data to this SQLXMLobject.WritersetCharacterStream()Returns a writer that can be used to write character data to this SQLXMLobject.<T extends Result>
TsetResult(Class<T> resultClass)Returns aResultfor writing this object's data.voidsetString(String value)Sets this object's data to the given XML string.
-
Method Details
-
free
Frees any resources held by this object. Afterfreeis called, calling method other thanfreewill throwSQLException(callingfreerepeatedly will do nothing).- Throws:
SQLException
-
getBinaryStream
Returns a stream that can be used to read binary data from this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
setBinaryStream
Returns a stream that can be used to write binary data to this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
getCharacterStream
Returns a reader that can be used to read character data from this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
setCharacterStream
Returns a writer that can be used to write character data to this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
getString
Returns this object's data as an XML string.- Throws:
SQLException- if an error occurs accessing the data
-
setString
Sets this object's data to the given XML string.- Throws:
SQLException- if an error occurs accessing the data
-
getSource
Returns aSourcefor reading this object's data.- Throws:
SQLException- if an error occurs accessing the data
-
setResult
Returns aResultfor writing this object's data.- Throws:
SQLException- if an error occurs accessing the data
-