Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.sql.SQLInput


public interface SQLInput
JDBC 2.0 A SQLInput stream contains a stream of values that represent an SQL UDT instance.


Method Summary
ArrayLocator  readArrayLocator()
Read a LOCATOR(<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.BigDecimal object.
InputStream  readBinaryStream()
Return the next attribute in the stream as a stream of uninterpreted bytes.
BlobLocator  ReadBlobLocator()
Read a LOCATOR(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.
ClobLocator  readClobLocator()
Read a LOCATOR(CLOB) from the stream.
Date  readDate()
Read the next attribute in the stream as a java.sql.Date object.
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 an object instance representing an SQL type.
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.
StructLocator  readStructLocator()
Read a LOCATOR(<structured-type>) from the stream.
Time  readTime()
Read the next attribute in the stream as a java.sql.Time object.
Timestamp  readTimestamp()
Read the next attribute in the stream as a java.sql.Timestamp object.
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 an object instance representing an SQL type. 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. Raise exception if the next item in the stream is not a structured or distinct type datum. When the datum at the head of the stream is an SQL NULL, the method returns null. Otherwise, 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

ReadBlobLocator

public BlobLocator ReadBlobLocator() throws SQLException
Read a LOCATOR(BLOB) from the stream.
Returns:
an object representing data of a locator to a BLOB

readClobLocator

public ClobLocator readClobLocator() throws SQLException
Read a LOCATOR(CLOB) from the stream.
Returns:
an object representing data of a locator to a CLOB

readStructLocator

public StructLocator readStructLocator() throws SQLException
Read a LOCATOR(<structured-type>) from the stream.
Returns:
an object representing data of a locator to an instance of a Structured Type

readArrayLocator

public ArrayLocator readArrayLocator() throws SQLException
Read a LOCATOR(<array>) from the stream.
Returns:
an object representing data of a locator to an SQL array

wasNull

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

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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.