public class SQLOutputImpl extends Object implements SQLOutput
 When an application calls the
 method PreparedStatement.setObject, the driver
 checks to see whether the value to be written is a UDT with
 a custom mapping.  If it is, there will be an entry in a
 type map containing the Class object for the
 class that implements SQLData for this UDT.
 If the value to be written is an instance of SQLData,
 the driver will create an instance of SQLOutputImpl
 and pass it to the method SQLData.writeSQL.
 The method writeSQL in turn calls the
 appropriate SQLOutputImpl.writeXXX methods
 to write data from the SQLData object to
 the SQLOutputImpl output stream as the
 representation of an SQL user-defined type.
| Constructor and Description | 
|---|
| SQLOutputImpl(Vector<?> attributes,
             Map<String,?> map)Creates a new  SQLOutputImplobject
 initialized with the given vector of attributes and
 type map. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | writeArray(Array x)Writes an  Arrayobject in the Java
 programming language to thisSQLOutputImplobject. | 
| void | writeAsciiStream(InputStream x)Writes a stream of ASCII characters to this
  SQLOutputImplobject. | 
| void | writeBigDecimal(BigDecimal x)Writes a  java.math.BigDecimalobject in the Java programming
 language to thisSQLOutputImplobject. | 
| void | writeBinaryStream(InputStream x)Writes a stream of uninterpreted bytes to this  SQLOutputImplobject. | 
| void | writeBlob(Blob x)Writes a  Blobobject in the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeBoolean(boolean x)Writes a  booleanin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeByte(byte x)Writes a  bytein the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeBytes(byte[] x)Writes an array of  bytesin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeCharacterStream(Reader x)Writes a stream of Unicode characters to this
  SQLOutputImplobject. | 
| void | writeClob(Clob x)Writes a  Clobobject in the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeDate(Date x)Writes a  java.sql.Dateobject in the Java programming
 language to thisSQLOutputImplobject. | 
| void | writeDouble(double x)Writes a  doublein the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeFloat(float x)Writes a  floatin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeInt(int x)Writes an  intin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeLong(long x)Writes a  longin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeNClob(NClob x)Writes an SQL  NCLOBvalue to the stream. | 
| void | writeNString(String x)Writes the next attribute to the stream as a  Stringin the Java programming language. | 
| void | writeObject(SQLData x)Writes to the stream the data contained in the given
  SQLDataobject. | 
| void | writeRef(Ref x)Writes a  Refobject in the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeRowId(RowId x)Writes an SQL  ROWIDvalue to the stream. | 
| void | writeShort(short x)Writes a  shortin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeSQLXML(SQLXML x)Writes an SQL  XMLvalue to the stream. | 
| void | writeString(String x)Writes a  Stringin the Java programming language
 to thisSQLOutputImplobject. | 
| void | writeStruct(Struct x)Writes a  Structobject in the Java
 programming language to thisSQLOutputImplobject. | 
| void | writeTime(Time x)Writes a  java.sql.Timeobject in the Java programming
 language to thisSQLOutputImplobject. | 
| void | writeTimestamp(Timestamp x)Writes a  java.sql.Timestampobject in the Java programming
 language to thisSQLOutputImplobject. | 
| void | writeURL(URL url)Writes an  java.sql.Type.DATALINKobject in the Java
 programming language to thisSQLOutputImplobject. | 
public SQLOutputImpl(Vector<?> attributes, Map<String,?> map) throws SQLException
SQLOutputImpl object
 initialized with the given vector of attributes and
 type map.  The driver will use the type map to determine
 which SQLData.writeSQL method to invoke.
 This method will then call the appropriate
 SQLOutputImpl writer methods in order and
 thereby write the attributes to the new output stream.attributes - a Vector object containing the attributes of
        the UDT to be mapped to one or more objects in the Java
        programming languagemap - a java.util.Map object containing zero or
        more entries, with each entry consisting of 1) a String
        giving the fully qualified name of a UDT and 2) the
        Class object for the SQLData implementation
        that defines how the UDT is to be mappedSQLException - if the attributes or the map
        is a null valuepublic void writeString(String x) throws SQLException
String in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL CHAR, VARCHAR, or
 LONGVARCHAR before returning it to the database.writeString in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeBoolean(boolean x)
                  throws SQLException
boolean in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL BIT before returning it to the database.writeBoolean in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeByte(byte x)
               throws SQLException
byte in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL BIT before returning it to the database.writeByte in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeShort(short x)
                throws SQLException
short in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL SMALLINT before returning it to the database.writeShort in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeInt(int x)
              throws SQLException
int in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL INTEGER before returning it to the database.writeInt in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeLong(long x)
               throws SQLException
long in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL BIGINT before returning it to the database.writeLong in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeFloat(float x)
                throws SQLException
float in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL REAL before returning it to the database.writeFloat in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeDouble(double x)
                 throws SQLException
double in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL DOUBLE before returning it to the database.writeDouble in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeBigDecimal(BigDecimal x) throws SQLException
java.math.BigDecimal object in the Java programming
 language to this SQLOutputImpl object. The driver converts
 it to an SQL NUMERIC before returning it to the database.writeBigDecimal in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeBytes(byte[] x)
                throws SQLException
bytes in the Java programming language
 to this SQLOutputImpl object. The driver converts
 it to an SQL VARBINARY or LONGVARBINARY
 before returning it to the database.writeBytes in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeDate(Date x) throws SQLException
java.sql.Date object in the Java programming
 language to this SQLOutputImpl object. The driver converts
 it to an SQL DATE before returning it to the database.writeDate in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeTime(Time x) throws SQLException
java.sql.Time object in the Java programming
 language to this SQLOutputImpl object. The driver converts
 it to an SQL TIME before returning it to the database.writeTime in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeTimestamp(Timestamp x) throws SQLException
java.sql.Timestamp object in the Java programming
 language to this SQLOutputImpl object. The driver converts
 it to an SQL TIMESTAMP before returning it to the database.writeTimestamp in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeCharacterStream(Reader x) throws SQLException
SQLOutputImpl object. The driver will do any necessary
 conversion from Unicode to the database CHAR format.writeCharacterStream in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeAsciiStream(InputStream x) throws SQLException
SQLOutputImpl object. The driver will do any necessary
 conversion from ASCII to the database CHAR format.writeAsciiStream in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeBinaryStream(InputStream x) throws SQLException
SQLOutputImpl
 object.writeBinaryStream in interface SQLOutputx - the value to pass to the databaseSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeObject(SQLData x) throws SQLException
SQLData object.
 When the SQLData object is null, this
 method writes an SQL NULL to the stream.
 Otherwise, it calls the SQLData.writeSQL
 method of the given object, which
 writes the object's attributes to the stream.
 
 The implementation of the method SQLData.writeSQ
 calls the appropriate SQLOutputImpl.writeXXX method(s)
 for writing each of the object's attributes in order.
 The attributes must be read from an SQLInput
 input stream and written to an SQLOutputImpl
 output stream in the same order in which they were
 listed in the SQL definition of the user-defined type.
writeObject in interface SQLOutputx - the object representing data of an SQL structured or
          distinct typeSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeRef(Ref x) throws SQLException
Ref object in the Java programming language
 to this SQLOutputImpl object.  The driver converts
 it to a serializable SerialRef SQL REF value
 before returning it to the database.writeRef in interface SQLOutputx - an object representing an SQL REF valueSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeBlob(Blob x) throws SQLException
Blob object in the Java programming language
 to this SQLOutputImpl object.  The driver converts
 it to a serializable SerialBlob SQL BLOB value
 before returning it to the database.writeBlob in interface SQLOutputx - an object representing an SQL BLOB valueSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeClob(Clob x) throws SQLException
Clob object in the Java programming language
 to this SQLOutputImpl object.  The driver converts
 it to a serializable SerialClob SQL CLOB value
 before returning it to the database.writeClob in interface SQLOutputx - an object representing an SQL CLOB valueSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeStruct(Struct x) throws SQLException
Struct object in the Java
 programming language to this SQLOutputImpl
 object. The driver converts this value to an SQL structured type
 before returning it to the database.
 
 This method should be used when an SQL structured type has been
 mapped to a Struct object in the Java programming
 language (the standard mapping).  The method
 writeObject should be used if an SQL structured type
 has been custom mapped to a class in the Java programming language.
writeStruct in interface SQLOutputx - an object representing the attributes of an SQL structured typeSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeArray(Array x) throws SQLException
Array object in the Java
 programming language to this SQLOutputImpl
 object. The driver converts this value to a serializable
 SerialArray SQL ARRAY
 value before returning it to the database.writeArray in interface SQLOutputx - an object representing an SQL ARRAY valueSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeURL(URL url) throws SQLException
java.sql.Type.DATALINK object in the Java
 programming language to this SQLOutputImpl object. The
 driver converts this value to a serializable SerialDatalink
 SQL DATALINK value before return it to the database.writeURL in interface SQLOutputurl - an object representing a SQL DATALINK valueSQLException - if the SQLOutputImpl object is in
        use by a SQLData object attempting to write the attribute
        values of a UDT to the database.public void writeNString(String x) throws SQLException
String
 in the Java programming language. The driver converts this to a
 SQL NCHAR or
 NVARCHAR or LONGNVARCHAR value
 (depending on the argument's
 size relative to the driver's limits on NVARCHAR values)
 when it sends it to the stream.writeNString in interface SQLOutputx - the value to pass to the databaseSQLException - if a database access error occurspublic void writeNClob(NClob x) throws SQLException
NCLOB value to the stream.writeNClob in interface SQLOutputx - a NClob object representing data of an SQL
 NCLOB valueSQLException - if a database access error occurspublic void writeRowId(RowId x) throws SQLException
ROWID value to the stream.writeRowId in interface SQLOutputx - a RowId object representing data of an SQL
 ROWID valueSQLException - if a database access error occurspublic void writeSQLXML(SQLXML x) throws SQLException
XML value to the stream.writeSQLXML in interface SQLOutputx - a SQLXML object representing data of an SQL
 XML valueSQLException - if a database access error occurs Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2013, Oracle and/or its affiliates.  All rights reserved.