Java Platform 1.2
Beta 4

Interface java.sql.SQLInput


public abstract interface SQLInput
JDBC 2.0 A SQLInput stream contains a stream of values that represent an SQL structured or distinct type instance.


Method Summary
 Array readArray()
          Read an array from the stream.
 InputStream readAsciiStream()
          Return the next attribute in the stream as a stream of ASCII characters.
 BigDecimal readBigDecimal()
          Read the next attribute in the stream as a java.math.
 InputStream readBinaryStream()
          Return the next attribute in the stream as a stream of uninterpreted bytes.
 Blob readBlob()
          Read a BLOB from the stream.
 boolean readBoolean()
          Read the next attribute in the stream as a Java boolean.
 byte readByte()
          Read the next attribute in the stream as a Java byte.
 byte[] readBytes()
          Read the next attribute in the stream as an array of bytes.
 Reader readCharacterStream()
          Return the next attribute in the stream as a stream of Unicode characters.
 Clob readClob()
          Read a CLOB from the stream.
 Date readDate()
          Read the next attribute in the stream as a java.sql.
 double readDouble()
          Read the next attribute in the stream as a Java double.
 float readFloat()
          Read the next attribute in the stream as a Java float.
 int readInt()
          Read the next attribute in the stream as a Java int.
 long readLong()
          Read the next attribute in the stream as a Java long.
 Object readObject()
          Return the datum at the head of the stream as a Java object.
 Ref readRef()
          Read a REF(<structured-type>) from the stream.
 short readShort()
          Read the next attribute in the stream as a Java short.
 String readString()
          Read the next attribute in the stream as a Java String.
 Time readTime()
          Read the next attribute in the stream as a java.sql.
 Timestamp readTimestamp()
          Read the next attribute in the stream as a java.sql.
 boolean wasNull()
           
 

Method Detail

readString

public String readString()
                  throws SQLException
Read the next attribute in the stream as a Java String.
Returns:
the attribute; if the value is SQL NULL, return null.

readBoolean

public boolean readBoolean()
                    throws SQLException
Read the next attribute in the stream as a Java boolean.
Returns:
the attribute; if the value is SQL NULL, return null.

readByte

public byte readByte()
              throws SQLException
Read the next attribute in the stream as a Java byte.
Returns:
the attribute; if the value is SQL NULL, return null.

readShort

public short readShort()
                throws SQLException
Read the next attribute in the stream as a Java short.
Returns:
the attribute; if the value is SQL NULL, return null.

readInt

public int readInt()
            throws SQLException
Read the next attribute in the stream as a Java int.
Returns:
the attribute; if the value is SQL NULL, return null.

readLong

public long readLong()
              throws SQLException
Read the next attribute in the stream as a Java long.
Returns:
the attribute; if the value is SQL NULL, return null.

readFloat

public float readFloat()
                throws SQLException
Read the next attribute in the stream as a Java float.
Returns:
the attribute; if the value is SQL NULL, return null.

readDouble

public double readDouble()
                  throws SQLException
Read the next attribute in the stream as a Java double.
Returns:
the attribute; if the value is SQL NULL, return null.

readBigDecimal

public BigDecimal readBigDecimal()
                          throws SQLException
Read the next attribute in the stream as a java.math.BigDecimal object.
Returns:
the attribute; if the value is SQL NULL, return null.

readBytes

public byte[] readBytes()
                 throws SQLException
Read the next attribute in the stream as an array of bytes.
Returns:
the attribute; if the value is SQL NULL, return null.

readDate

public Date readDate()
              throws SQLException
Read the next attribute in the stream as a java.sql.Date object.
Returns:
the attribute; if the value is SQL NULL, return null.

readTime

public Time readTime()
              throws SQLException
Read the next attribute in the stream as a java.sql.Time object.
Returns:
the attribute; if the value is SQL NULL, return null.

readTimestamp

public Timestamp readTimestamp()
                        throws SQLException
Read the next attribute in the stream as a java.sql.Timestamp object.
Returns:
the attribute; if the value is SQL NULL, return null.

readCharacterStream

public Reader readCharacterStream()
                           throws SQLException
Return the next attribute in the stream as a stream of Unicode characters.
Returns:
the attribute; if the value is SQL NULL, return null.

readAsciiStream

public InputStream readAsciiStream()
                            throws SQLException
Return the next attribute in the stream as a stream of ASCII characters.
Returns:
the attribute; if the value is SQL NULL, return null.

readBinaryStream

public InputStream readBinaryStream()
                             throws SQLException
Return the next attribute in the stream as a stream of uninterpreted bytes.
Returns:
the attribute; if the value is SQL NULL, return null.

readObject

public Object readObject()
                  throws SQLException
Return the datum at the head of the stream as a Java object. The actual type of the object returned is determined by the default type mapping, and any customizations present in this stream's type map. A type map is registered with the stream by the JDBC driver before the stream is passed to the application. When the datum at the head of the stream is an SQL NULL, the method returns null. If the datum is an SQL structured or distinct type, it determines the SQL type of the datum at the head of the stream, constructs an object of the appropriate class, and calls method SQLData.readSQL on that object, which reads additional data from the stream, using the protocol described for SQLData.readSQL.

readRef

public Ref readRef()
            throws SQLException
Read a REF(<structured-type>) from the stream.
Returns:
an object representing data of an SQL REF Type

readBlob

public Blob readBlob()
              throws SQLException
Read a BLOB from the stream.
Returns:
an object representing a BLOB

readClob

public Clob readClob()
              throws SQLException
Read a CLOB from the stream.
Returns:
an object representing a CLOB

readArray

public Array readArray()
                throws SQLException
Read an array from the stream.
Returns:
an object representing an SQL array

wasNull

public boolean wasNull()
                throws SQLException
Returns:
true iff the most recently gotten SQL value was null.

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.