| public interface java.sql SQLInput
|
Java SE 6 |
SQLInput methods. The reader methods
(readLong, readBytes, and so on)
provide a way for an implementation of the SQLData
interface to read the values in an SQLInput object.
And as described in SQLData, calls to reader methods must
be made in the order that their corresponding attributes appear in the
SQL definition of the type.
The method wasNull is used to determine whether
the last value read was SQL NULL.
When the method getObject is called with an
object of a class implementing the interface SQLData,
the JDBC driver calls the method SQLData.getSQLType
to determine the SQL type of the user-defined type (UDT)
being custom mapped. The driver
creates an instance of SQLInput, populating it with the
attributes of the UDT. The driver then passes the input
stream to the method SQLData.readSQL, which in turn
calls the SQLInput reader methods
in its implementation for reading the
attributes from the input stream.
| since | 1.2 |
| Methods | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| public Array | readArray() throws SQLException Details
Reads an SQL ARRAY value from the stream and returns it as an
Array object in the Java programming language.
| ||||||||
| public InputStream | readAsciiStream() throws SQLException Details
Reads the next attribute in the stream and returns it as a stream of ASCII characters.
| ||||||||
| public BigDecimal | readBigDecimal() throws SQLException Details
Reads the next attribute in the stream and returns it as a java.math.BigDecimal
object in the Java programming language.
| ||||||||
| public InputStream | readBinaryStream() throws SQLException Details
Reads the next attribute in the stream and returns it as a stream of uninterpreted
bytes.
| ||||||||
| public Blob | readBlob() throws SQLException Details
Reads an SQL BLOB value from the stream and returns it as a
Blob object in the Java programming language.
| ||||||||
| public boolean | readBoolean() throws SQLException Details
Reads the next attribute in the stream and returns it as a boolean
in the Java programming language.
| ||||||||
| public byte | readByte() throws SQLException Details
Reads the next attribute in the stream and returns it as a byte
in the Java programming language.
| ||||||||
| public byte[] | readBytes() throws SQLException Details
Reads the next attribute in the stream and returns it as an array of bytes
in the Java programming language.
| ||||||||
| public Reader | readCharacterStream() throws SQLException Details
Reads the next attribute in the stream and returns it as a stream of Unicode characters.
| ||||||||
| public Clob | readClob() throws SQLException Details
Reads an SQL CLOB value from the stream and returns it as a
Clob object in the Java programming language.
| ||||||||
| public Date | readDate() throws SQLException Details
Reads the next attribute in the stream and returns it as a java.sql.Date object.
| ||||||||
| public double | readDouble() throws SQLException Details
Reads the next attribute in the stream and returns it as a double
in the Java programming language.
| ||||||||
| public float | readFloat() throws SQLException Details
Reads the next attribute in the stream and returns it as a float
in the Java programming language.
| ||||||||
| public int | readInt() throws SQLException Details
Reads the next attribute in the stream and returns it as an int
in the Java programming language.
| ||||||||
| public long | readLong() throws SQLException Details
Reads the next attribute in the stream and returns it as a long
in the Java programming language.
| ||||||||
| public NClob | readNClob() throws SQLException Details
Reads an SQL NCLOB value from the stream and returns it as a
NClob object in the Java programming language.
| ||||||||
| public String | readNString() throws SQLException Details
Reads the next attribute in the stream and returns it as a String
in the Java programming language. It is intended for use when
accessing NCHAR,NVARCHAR
and LONGNVARCHAR columns.
| ||||||||
| public Object | readObject() throws SQLException Details
Reads the datum at the head of the stream and returns it as an
Object in the Java programming language. 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
| ||||||||
| public Ref | readRef() throws SQLException Details
Reads an SQL REF value from the stream and returns it as a
Ref object in the Java programming language.
| ||||||||
| public RowId | readRowId() throws SQLException Details
Reads an SQL ROWID value from the stream and returns it as a
RowId object in the Java programming language.
| ||||||||
| public short | readShort() throws SQLException Details
Reads the next attribute in the stream and returns it as a short
in the Java programming language.
| ||||||||
| public SQLXML | readSQLXML() throws SQLException Details
Reads an SQL XML value from the stream and returns it as a
SQLXML object in the Java programming language.
| ||||||||
| public String | readString() throws SQLException Details
Reads the next attribute in the stream and returns it as a String
in the Java programming language.
| ||||||||
| public Time | readTime() throws SQLException Details
Reads the next attribute in the stream and returns it as a java.sql.Time object.
| ||||||||
| public Timestamp | readTimestamp() throws SQLException Details
Reads the next attribute in the stream and returns it as a java.sql.Timestamp object.
| ||||||||
| public URL | readURL() throws SQLException Details
Reads an SQL DATALINK value from the stream and returns it as a
java.net.URL object in the Java programming language.
| ||||||||
| public boolean | wasNull() throws SQLException Details
Retrieves whether the last value read was SQL NULL.
| ||||||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|