Build 1.0_r1(from source)

java.sql
Interface SQLOutput


public interface SQLOutput

The interface for an output stream used to write attributes of an SQL User Defined Type to the database. This interface is used for custom mapping of types and is called by the JDBC driver. It is not expected that this interface is used by applications.

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.


Method Summary
 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 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 writeShort(short theShort)
          Write a short value into the output stream.
 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 an SQL DATALINK value into the output stream.
 

Method Detail

writeString

void writeString(String theString)
                 throws SQLException
Write a String value into the output stream.

Parameters:
theString - the String to write
Throws:
SQLException - if a database error occurs

writeBoolean

void writeBoolean(boolean theFlag)
                  throws SQLException
Write a boolean value into the output stream.

Parameters:
theFlag - the boolean value to write
Throws:
SQLException - if a database error occurs

writeByte

void writeByte(byte theByte)
               throws SQLException
Write a byte value into the output stream.

Parameters:
theByte - the byte value to write
Throws:
SQLException - if a database error occurs

writeShort

void writeShort(short theShort)
                throws SQLException
Write a short value into the output stream.

Parameters:
theShort - the short value to write
Throws:
SQLException - if a database error occurs

writeInt

void writeInt(int theInt)
              throws SQLException
Write an int value into the output stream.

Parameters:
theInt - the int value to write
Throws:
SQLException - if a database error occurs

writeLong

void writeLong(long theLong)
               throws SQLException
Write a long value into the output stream.

Parameters:
theLong - the long value to write
Throws:
SQLException - if a database error occurs

writeFloat

void writeFloat(float theFloat)
                throws SQLException
Write a float value into the output stream.

Parameters:
theFloat - the float value to write
Throws:
SQLException - if a database error occurs

writeDouble

void writeDouble(double theDouble)
                 throws SQLException
Write a double value into the output stream.

Parameters:
theDouble - the double value to write
Throws:
SQLException - if a database error occurs

writeBigDecimal

void writeBigDecimal(BigDecimal theBigDecimal)
                     throws SQLException
Write a java.math.BigDecimal value into the output stream.

Parameters:
theBigDecimal - the BigDecimal value to write
Throws:
SQLException - if a database error occurs

writeBytes

void writeBytes(byte[] theBytes)
                throws SQLException
Write an array of bytes into the output stream.

Parameters:
theBytes - the array of bytes to write
Throws:
SQLException - if a database error occurs

writeDate

void writeDate(Date theDate)
               throws SQLException
Write a java.sql.Date value into the output stream.

Parameters:
theDate - the Date value to write
Throws:
SQLException - if a database error occurs

writeTime

void writeTime(Time theTime)
               throws SQLException
Write a java.sql.Time value into the output stream.

Parameters:
theTime - the Time value to write
Throws:
SQLException - if a database error occurs

writeTimestamp

void writeTimestamp(Timestamp theTimestamp)
                    throws SQLException
Write a java.sql.Timestamp value into the output stream.

Parameters:
theTimestamp - the Timestamp value to write
Throws:
SQLException - if a database error occurs

writeCharacterStream

void writeCharacterStream(Reader theStream)
                          throws SQLException
Write a stream of Unicode characters into the output stream.

Parameters:
theStream - the stream of Unicode characters to write, as a java.io.Reader object
Throws:
SQLException - if a database error occurs

writeAsciiStream

void writeAsciiStream(InputStream theStream)
                      throws SQLException
Write a stream of ASCII characters into the output stream.

Parameters:
theStream - the stream of ASCII characters to write, as a java.io.InputStream object
Throws:
SQLException - if a database error occurs

writeBinaryStream

void writeBinaryStream(InputStream theStream)
                       throws SQLException
Write a stream of uninterpreted bytes into the output stream.

Parameters:
theStream - the stream of bytes to write, as a java.io.InputStream object
Throws:
SQLException - if a database error occurs

writeObject

void writeObject(SQLData theObject)
                 throws SQLException
Write an SQLData object into the output stream.

If the SQLData object is null, writes SQL 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.

Parameters:
theObject - the SQLData object to write
Throws:
SQLException - if a database error occurs

writeRef

void writeRef(Ref theRef)
              throws SQLException
Write an SQL Ref value into the output stream.

Parameters:
theRef - the java.sql.Ref object to write
Throws:
SQLException - if a database error occurs

writeBlob

void writeBlob(Blob theBlob)
               throws SQLException
Write an SQL Blob value into the output stream.

Parameters:
theBlob - the java.sql.Blob object to write
Throws:
SQLException - if a database error occurs

writeClob

void writeClob(Clob theClob)
               throws SQLException
Write an SQL Clob value into the output stream.

Parameters:
theClob - the java.sql.Clob object to write
Throws:
SQLException - if a database error occurs

writeStruct

void writeStruct(Struct theStruct)
                 throws SQLException
Write an SQL Struct value into the output stream.

Parameters:
theStruct - the java.sql.Struct object to write
Throws:
SQLException - if a database error occurs

writeArray

void writeArray(Array theArray)
                throws SQLException
Write an SQL Array value into the output stream.

Parameters:
theArray - the java.sql.Array object to write
Throws:
SQLException - if a database error occurs

writeURL

void writeURL(URL theURL)
              throws SQLException
Write an SQL DATALINK value into the output stream.

Parameters:
theURL - the Datalink value as a java.net.URL to write
Throws:
SQLException - if a database error occurs

Build 1.0_r1(from source)

Please submit a feedback, bug or feature