When an object of a class implementing the interface
SQLData is passed as an argument to an SQL statement, the
JDBC driver calls the method SQLData.getSQLType to
determine the kind of SQL
datum being passed to the database.
The driver then creates an instance of SQLOutput and
passes it to the method SQLData.writeSQL.
The method writeSQL in turn calls the
appropriate SQLOutput writer methods
writeBoolean, writeCharacterStream, and so on)
to write data from the SQLData object to
the SQLOutput output stream as the
representation of an SQL user-defined type.
| Modifier and Type | Method and Description |
|---|---|
| public void | writeArray(Array
an x)Array object representing data of an SQL
ARRAY typeWrites an SQL |
| public void | writeAsciiStream(InputStream
the value to pass to the database x)Writes the next attribute to the stream as a stream of ASCII characters. |
| public void | writeBigDecimal(BigDecimal
the value to pass to the database x)Writes the next attribute to the stream as a java.math.BigDecimal object. |
| public void | writeBinaryStream(InputStream
the value to pass to the database x)Writes the next attribute to the stream as a stream of uninterpreted bytes. |
| public void | |
| public void | writeBoolean(boolean
the value to pass to the database x)Writes the next attribute to the stream as a Java boolean. |
| public void | writeByte(byte
the value to pass to the database x)Writes the next attribute to the stream as a Java byte. |
| public void | writeBytes(byte[]
the value to pass to the database x)Writes the next attribute to the stream as an array of bytes. |
| public void | writeCharacterStream(Reader
the value to pass to the database x)Writes the next attribute to the stream as a stream of Unicode characters. |
| public void | |
| public void | |
| public void | writeDouble(double
the value to pass to the database x)Writes the next attribute to the stream as a Java double. |
| public void | writeFloat(float
the value to pass to the database x)Writes the next attribute to the stream as a Java float. |
| public void | writeInt(int
the value to pass to the database x)Writes the next attribute to the stream as a Java int. |
| public void | writeLong(long
the value to pass to the database x)Writes the next attribute to the stream as a Java long. |
| public void | writeNClob(NClob
a x)NClob object representing data of an SQL
NCLOB valueWrites an SQL |
| public void | writeNString(String
the value to pass to the database x)Writes the next attribute to the stream as a |
| public void | writeObject(SQLData
the object representing data of an SQL structured or
distinct type x)Writes to the stream the data contained in the given
|
| public default void | writeObject(Object
the object containing the input parameter value x, SQLType the SQL type to be sent to the database. targetSqlType)Writes to the stream the data contained in the given object. |
| public void | |
| public void | writeRowId(RowId
a x)RowId object representing data of an SQL
ROWID valueWrites an SQL |
| public void | writeShort(short
the value to pass to the database x)Writes the next attribute to the stream as a Java short. |
| public void | writeSQLXML(SQLXML
a x)SQLXML object representing data of an SQL
XML valueWrites an SQL |
| public void | writeString(String
the value to pass to the database x)Writes the next attribute to the stream as a |
| public void | writeStruct(Struct
a x)Struct object representing data of an SQL
structured typeWrites an SQL structured type value to the stream. |
| public void | |
| public void | writeTimestamp(Timestamp
the value to pass to the database x)Writes the next attribute to the stream as a java.sql.Timestamp object. |
| public void |
| writeArray | back to summary |
|---|---|
| public void writeArray(Array x) throws SQLException Writes an SQL
| |
| writeAsciiStream | back to summary |
|---|---|
| public void writeAsciiStream(InputStream x) throws SQLException Writes the next attribute to the stream as a stream of ASCII characters.
| |
| writeBigDecimal | back to summary |
|---|---|
| public void writeBigDecimal(BigDecimal x) throws SQLException Writes the next attribute to the stream as a java.math.BigDecimal object.
Writes the next attribute to the stream as a
| |
| writeBinaryStream | back to summary |
|---|---|
| public void writeBinaryStream(InputStream x) throws SQLException Writes the next attribute to the stream as a stream of uninterpreted bytes.
| |
| writeBlob | back to summary |
|---|---|
| public void writeBlob(Blob x) throws SQLException Writes an SQL
| |
| writeBoolean | back to summary |
|---|---|
| public void writeBoolean(boolean x) throws SQLException Writes the next attribute to the stream as a Java boolean.
Writes the next attribute to the stream as a
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(byte x) throws SQLException Writes the next attribute to the stream as a Java byte.
Writes the next attribute to the stream as a
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(byte[] x) throws SQLException Writes the next attribute to the stream as an array of bytes.
Writes the next attribute to the stream as a
| |
| writeCharacterStream | back to summary |
|---|---|
| public void writeCharacterStream(Reader x) throws SQLException Writes the next attribute to the stream as a stream of Unicode characters.
| |
| writeClob | back to summary |
|---|---|
| public void writeClob(Clob x) throws SQLException Writes an SQL
| |
| writeDate | back to summary |
|---|---|
| public void writeDate(Date x) throws SQLException Writes the next attribute to the stream as a java.sql.Date object.
Writes the next attribute to the stream as a
| |
| writeDouble | back to summary |
|---|---|
| public void writeDouble(double x) throws SQLException Writes the next attribute to the stream as a Java double.
Writes the next attribute to the stream as a
| |
| writeFloat | back to summary |
|---|---|
| public void writeFloat(float x) throws SQLException Writes the next attribute to the stream as a Java float.
Writes the next attribute to the stream as a
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(int x) throws SQLException Writes the next attribute to the stream as a Java int.
Writes the next attribute to the stream as a
| |
| writeLong | back to summary |
|---|---|
| public void writeLong(long x) throws SQLException Writes the next attribute to the stream as a Java long.
Writes the next attribute to the stream as a
| |
| writeNClob | back to summary |
|---|---|
| public void writeNClob(NClob x) throws SQLException Writes an SQL
| |
| writeNString | back to summary |
|---|---|
| public void writeNString(String x) throws SQLException Writes the next attribute to the stream as a
| |
| writeObject | back to summary |
|---|---|
| public void writeObject(SQLData x) throws SQLException Writes to the stream the data contained in the given
| |
| writeObject | back to summary |
|---|---|
| public default void writeObject(Object x, SQLType targetSqlType) throws SQLException Writes to the stream the data contained in the given object. The object will be converted to the specified targetSqlType before being sent to the stream.
When the
If the object has a custom mapping (is of a class implementing the
interface
The default implementation will throw
| |
| writeRef | back to summary |
|---|---|
| public void writeRef(Ref x) throws SQLException Writes an SQL
| |
| writeRowId | back to summary |
|---|---|
| public void writeRowId(RowId x) throws SQLException Writes an SQL
| |
| writeShort | back to summary |
|---|---|
| public void writeShort(short x) throws SQLException Writes the next attribute to the stream as a Java short.
Writes the next attribute to the stream as a
| |
| writeSQLXML | back to summary |
|---|---|
| public void writeSQLXML(SQLXML x) throws SQLException Writes an SQL
| |
| writeString | back to summary |
|---|---|
| public void writeString(String x) throws SQLException Writes the next attribute to the stream as a
| |
| writeStruct | back to summary |
|---|---|
| public void writeStruct(Struct x) throws SQLException Writes an SQL structured type value to the stream.
| |
| writeTime | back to summary |
|---|---|
| public void writeTime(Time x) throws SQLException Writes the next attribute to the stream as a java.sql.Time object.
Writes the next attribute to the stream as a
| |
| writeTimestamp | back to summary |
|---|---|
| public void writeTimestamp(Timestamp x) throws SQLException Writes the next attribute to the stream as a java.sql.Timestamp object.
Writes the next attribute to the stream as a
| |
| writeURL | back to summary |
|---|---|
| public void writeURL(URL x) throws SQLException Writes a SQL
| |