public class AS400JDBCSQLXML
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
isXML_ |
Modifier | Constructor and Description |
---|---|
protected |
AS400JDBCSQLXML()
Constructs an AS400JDBCSQLXML object.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
This method frees the object and releases the
the resources that it holds.
|
java.io.InputStream |
getBinaryStream()
Retrieves the XML value designated by this SQLXML instance as a stream.
|
java.io.Reader |
getCharacterStream()
Retrieves the XML value designated by this SQLXML instance as a java.io.Reader object.
|
java.lang.String |
getString()
Retrieves a string representation of the XML value designated by this
SQLXML object. |
java.io.OutputStream |
setBinaryStream()
Retrieves a stream that can be used to write the XML value that this SQLXML instance represents.
|
java.io.Writer |
setCharacterStream()
Retrieves a Writer to be used to write the XML value that this SQLXML instance represents.
|
void |
setString(java.lang.String str)
Writes the given Java String to the XML value that this
SQLXML object designates. |
protected AS400JDBCSQLXML()
public java.io.Reader getCharacterStream() throws java.sql.SQLException
The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation.
java.sql.SQLException
- if there is an error processing the XML value.
The getCause() method of the exception may provide a more detailed exception, for example,
if the stream does not contain valid characters.
An exception is thrown if the state is not readable.public java.lang.String getString() throws java.sql.SQLException
SQLXML
object.java.sql.SQLException
- if there is an error accessing the XML valuepublic void setString(java.lang.String str) throws java.sql.SQLException
SQLXML
object designates.str
- the string to be written to the XML value that this SQLXML
designatesjava.sql.SQLException
- if there is an error accessing the XML valuepublic java.io.InputStream getBinaryStream() throws java.sql.SQLException
java.sql.SQLException
- if there is an error processing the XML value.
An exception is thrown if the state is not readable.public java.io.OutputStream setBinaryStream() throws java.sql.SQLException
java.sql.SQLException
- if there is an error processing the XML value. An exception
is thrown if the state is not writable.public java.io.Writer setCharacterStream() throws java.sql.SQLException
java.sql.SQLException
- if there is an error processing the XML value.
The getCause() method of the exception may provide a more detailed exception, for example,
if the stream does not contain valid characters.
An exception is thrown if the state is not writable.public void free() throws java.sql.SQLException
free
method is called. If free
is called
multiple times, the subsequent calls to free
are treated
as a no-op.java.sql.SQLException
- If a database error occurs.
if an error occurs releasing the Clob's resources