Package java.sql
Interface SQLXML
-
public interface SQLXMLMaps SQL's XML type into Java.
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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 Detail
-
free
void free() throws SQLException
Frees any resources held by this object. Afterfreeis called, calling method other thanfreewill throwSQLException(callingfreerepeatedly will do nothing).- Throws:
SQLException
-
getBinaryStream
InputStream getBinaryStream() throws SQLException
Returns a stream that can be used to read binary data from this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
setBinaryStream
OutputStream setBinaryStream() throws SQLException
Returns a stream that can be used to write binary data to this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
getCharacterStream
Reader getCharacterStream() throws SQLException
Returns a reader that can be used to read character data from this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
setCharacterStream
Writer setCharacterStream() throws SQLException
Returns a writer that can be used to write character data to this SQLXMLobject.- Throws:
SQLException- if an error occurs accessing the data
-
getString
String getString() throws SQLException
Returns this object's data as an XML string.- Throws:
SQLException- if an error occurs accessing the data
-
setString
void setString(String value) throws SQLException
Sets this object's data to the given XML string.- Throws:
SQLException- if an error occurs accessing the data
-
getSource
<T extends Source> T getSource(Class<T> sourceClass) throws SQLException
Returns aSourcefor reading this object's data.- Throws:
SQLException- if an error occurs accessing the data
-
setResult
<T extends Result> T setResult(Class<T> resultClass) throws SQLException
Returns aResultfor writing this object's data.- Throws:
SQLException- if an error occurs accessing the data
-
-