public interface SQLOutput
When an object which implements the SQLData interface is used as an
argument to an SQL statement, the JDBC driver calls the method SQLData.getSQLType to establish the type of the SQL UDT that is being
passed. The driver then creates an SQLOutput stream and passes it to
the SQLData.writeSQL method, which in turn uses the appropriate
SQLOutput writer methods to write the data from the SQLData
object into the stream according to the defined mapping.
SQLData| Modifier and Type | Method and Description |
|---|---|
void |
writeArray(Array theArray)
Write an SQL
Array value into the output stream. |
void |
writeAsciiStream(InputStream theStream)
Write a stream of ASCII characters into the output stream.
|
void |
writeBigDecimal(BigDecimal theBigDecimal)
Write a
java.math.BigDecimal value into the output stream. |
void |
writeBinaryStream(InputStream theStream)
Write a stream of uninterpreted bytes into the output stream.
|
void |
writeBlob(Blob theBlob)
Write an SQL
Blob value into the output stream. |
void |
writeBoolean(boolean theFlag)
Write a
boolean value into the output stream. |
void |
writeByte(byte theByte)
Write a
byte value into the output stream. |
void |
writeBytes(byte[] theBytes)
Write an array of bytes into the output stream.
|
void |
writeCharacterStream(Reader theStream)
Write a stream of unicode characters into the output stream.
|
void |
writeClob(Clob theClob)
Write an SQL
Clob value into the output stream. |
void |
writeDate(Date theDate)
Write a
java.sql.Date value into the output stream. |
void |
writeDouble(double theDouble)
Write a
double value into the output stream. |
void |
writeFloat(float theFloat)
Write a
float value into the output stream. |
void |
writeInt(int theInt)
Write an
int value into the output stream. |
void |
writeLong(long theLong)
Write a
long value into the output stream. |
void |
writeNClob(NClob theNClob)
Write a
Clob into the output stream as an SQL NCLOB. |
void |
writeNString(String theString)
Write a
String into the output stream as an SQL NCHAR, NVARCHAR,
or LONGNVARCHAR. |
void |
writeObject(SQLData theObject)
Write an
SQLData object into the output stream. |
void |
writeRef(Ref theRef)
Write an SQL
Ref value into the output stream. |
void |
writeRowId(RowId theRowId)
Write a
RowId into the output stream as an SQL ROWID. |
void |
writeShort(short theShort)
Write a
short value into the output stream. |
void |
writeSQLXML(SQLXML theXml)
Write a
SQLXML into the output stream as an SQL XML. |
void |
writeString(String theString)
Write a
String value into the output stream. |
void |
writeStruct(Struct theStruct)
Write an SQL
Struct value into the output stream. |
void |
writeTime(Time theTime)
Write a
java.sql.Time value into the output stream. |
void |
writeTimestamp(Timestamp theTimestamp)
Write a
java.sql.Timestamp value into the output stream. |
void |
writeURL(URL theURL)
Write a
URL into the output stream as an SQL DATALINK. |
void writeString(String theString) throws SQLException
String value into the output stream.theString - the String to write.SQLException - if a database error occurs.void writeBoolean(boolean theFlag)
throws SQLException
boolean value into the output stream.theFlag - the boolean value to write.SQLException - if a database error occurs.void writeByte(byte theByte)
throws SQLException
byte value into the output stream.theByte - the byte value to write.SQLException - if a database error occurs.void writeShort(short theShort)
throws SQLException
short value into the output stream.theShort - the short value to write.SQLException - if a database error occurs.void writeInt(int theInt)
throws SQLException
int value into the output stream.theInt - the int value to write.SQLException - if a database error occurs.void writeLong(long theLong)
throws SQLException
long value into the output stream.theLong - the long value to write.SQLException - if a database error occurs.void writeFloat(float theFloat)
throws SQLException
float value into the output stream.theFloat - the float value to write.SQLException - if a database error occurs.void writeDouble(double theDouble)
throws SQLException
double value into the output stream.theDouble - the double value to write.SQLException - if a database error occurs.void writeBigDecimal(BigDecimal theBigDecimal) throws SQLException
java.math.BigDecimal value into the output stream.theBigDecimal - the BigDecimal value to write.SQLException - if a database error occurs.void writeBytes(byte[] theBytes)
throws SQLException
theBytes - the array of bytes to write.SQLException - if a database error occurs.void writeDate(Date theDate) throws SQLException
java.sql.Date value into the output stream.theDate - the Date value to write.SQLException - if a database error occurs.Datevoid writeTime(Time theTime) throws SQLException
java.sql.Time value into the output stream.theTime - the Time value to write.SQLException - if a database error occurs.Timevoid writeTimestamp(Timestamp theTimestamp) throws SQLException
java.sql.Timestamp value into the output stream.theTimestamp - the Timestamp value to write.SQLException - if a database error occurs.Timestampvoid writeCharacterStream(Reader theStream) throws SQLException
theStream - the stream of unicode characters to write, as a java.io.Reader object.SQLException - if a database error occurs.void writeAsciiStream(InputStream theStream) throws SQLException
theStream - the stream of ASCII characters to write, as a java.io.InputStream objectSQLException - if a database error occurs.void writeBinaryStream(InputStream theStream) throws SQLException
theStream - the stream of bytes to write, as a java.io.InputStream
objectSQLException - if a database error occurs.void writeObject(SQLData theObject) throws SQLException
SQLData object into the output stream.
If the SQLData object is null, writes NULL to the stream.
Otherwise, calls the SQLData.writeSQL method of the object, which
writes the object's attributes to the stream by calling the appropriate
SQLOutput writer methods for each attribute, in order. The order of the
attributes is the order they are listed in the SQL definition of the User
Defined Type.
theObject - the SQLData object to write.SQLException - if a database error occurs.SQLDatavoid writeRef(Ref theRef) throws SQLException
Ref value into the output stream.theRef - the java.sql.Ref object to write.SQLException - if a database error occurs.Refvoid writeBlob(Blob theBlob) throws SQLException
Blob value into the output stream.theBlob - the java.sql.Blob object to write.SQLException - if a database error occurs.Blobvoid writeClob(Clob theClob) throws SQLException
Clob value into the output stream.theClob - the java.sql.Clob object to write.SQLException - if a database error occurs.Clobvoid writeStruct(Struct theStruct) throws SQLException
Struct value into the output stream.theStruct - the java.sql.Struct object to write.SQLException - if a database error occurs.Structvoid writeArray(Array theArray) throws SQLException
Array value into the output stream.theArray - the java.sql.Array object to write.SQLException - if a database error occurs.Arrayvoid writeURL(URL theURL) throws SQLException
URL into the output stream as an SQL DATALINK.theURL - the datalink value as a java.net.URL to write.SQLException - if a database error occurs.URLvoid writeNString(String theString) throws SQLException
String into the output stream as an SQL NCHAR, NVARCHAR,
or LONGNVARCHAR.theString - the String to write.SQLException - if a database error occurs.void writeNClob(NClob theNClob) throws SQLException
Clob into the output stream as an SQL NCLOB.theNClob - the java.sql.Clob object to write.SQLException - if a database error occurs.void writeRowId(RowId theRowId) throws SQLException
RowId into the output stream as an SQL ROWID.theRowId - the java.sql.RowId object to write.SQLException - if a database error occurs.void writeSQLXML(SQLXML theXml) throws SQLException
SQLXML into the output stream as an SQL XML.theXml - the java.sql.SQLXML object to write.SQLException - if a database error occurs.