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.
Modifier and Type | Method and Description |
---|---|
public Array | Returns: anArray object representing data of the SQL
ARRAY value at the head of the stream; null
if the value read is SQL NULL Reads an SQL |
public InputStream | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a stream of ASCII characters. |
public BigDecimal | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public InputStream | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a stream of uninterpreted bytes. |
public Blob | Returns: aBlob object representing data of the SQL BLOB value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public boolean | Returns: the attribute; if the value is SQLNULL , returns false Reads the next attribute in the stream and returns it as a |
public byte | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as a |
public byte[] | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as an array of bytes in the Java programming language. |
public Reader | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a stream of Unicode characters. |
public Clob | Returns: aClob object representing data of the SQL CLOB value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public Date | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public double | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as a |
public float | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as a |
public int | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as an |
public long | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as a |
public NClob | Returns: aNClob object representing data of the SQL NCLOB value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public String | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public Object | Returns: the datum at the head of the stream as anObject in the
Java programming language;null if the datum is SQL NULL Reads the datum at the head of the stream and returns it as an
|
public default < the type of the class modeled by this Class object T> T | Returns: the attribute at the head of the stream as anObject in the
Java programming language;null if the attribute is SQL NULL Class representing the Java data type to convert the attribute to. type)Reads the next attribute in the stream and returns it as an
|
public Ref | Returns: aRef object representing the SQL REF value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public RowId | Returns: aRowId object representing data of the SQL ROWID value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public short | Returns: the attribute; if the value is SQLNULL , returns 0 Reads the next attribute in the stream and returns it as a |
public SQLXML | Returns: aSQLXML object representing data of the SQL XML value
at the head of the stream; null if the value read is
SQL NULL Reads an SQL |
public String | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public Time | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public Timestamp | Returns: the attribute; if the value is SQLNULL , returns null Reads the next attribute in the stream and returns it as a |
public URL | Returns: ajava.net.URL object.Reads an SQL |
public boolean | Returns: true if the most recently read SQL value was SQL
NULL ; false otherwiseRetrieves whether the last value read was SQL |
readArray | back to summary |
---|---|
public Array readArray() throws SQLException Reads an SQL
|
readAsciiStream | back to summary |
---|---|
public InputStream readAsciiStream() throws SQLException Reads the next attribute in the stream and returns it as a stream of ASCII characters.
|
readBigDecimal | back to summary |
---|---|
public BigDecimal readBigDecimal() throws SQLException Reads the next attribute in the stream and returns it as a
|
readBinaryStream | back to summary |
---|---|
public InputStream readBinaryStream() throws SQLException Reads the next attribute in the stream and returns it as a stream of uninterpreted bytes.
|
readBlob | back to summary |
---|---|
public Blob readBlob() throws SQLException Reads an SQL
|
readBoolean | back to summary |
---|---|
public boolean readBoolean() throws SQLException Reads the next attribute in the stream and returns it as a
|
readByte | back to summary |
---|---|
public byte readByte() throws SQLException Reads the next attribute in the stream and returns it as a
|
readBytes | back to summary |
---|---|
public byte[] readBytes() throws SQLException Reads the next attribute in the stream and returns it as an array of bytes in the Java programming language.
|
readCharacterStream | back to summary |
---|---|
public Reader readCharacterStream() throws SQLException Reads the next attribute in the stream and returns it as a stream of Unicode characters.
|
readClob | back to summary |
---|---|
public Clob readClob() throws SQLException Reads an SQL
|
readDate | back to summary |
---|---|
public Date readDate() throws SQLException Reads the next attribute in the stream and returns it as a
|
readDouble | back to summary |
---|---|
public double readDouble() throws SQLException Reads the next attribute in the stream and returns it as a
|
readFloat | back to summary |
---|---|
public float readFloat() throws SQLException Reads the next attribute in the stream and returns it as a
|
readInt | back to summary |
---|---|
public int readInt() throws SQLException Reads the next attribute in the stream and returns it as an
|
readLong | back to summary |
---|---|
public long readLong() throws SQLException Reads the next attribute in the stream and returns it as a
|
readNClob | back to summary |
---|---|
public NClob readNClob() throws SQLException Reads an SQL
|
readNString | back to summary |
---|---|
public String readNString() throws SQLException Reads the next attribute in the stream and returns it as a
|
readObject | back to summary |
---|---|
public Object readObject() throws SQLException Reads the datum at the head of the stream and returns it as an
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
|
readObject | back to summary |
---|---|
public default <T> T readObject(Class<T> type) throws SQLException Reads the next attribute in the stream and returns it as an
A type map is registered with the stream by the JDBC driver before the stream is passed to the application. When the attribute at the head of the stream is an SQL
The default implementation will throw
|
readRef | back to summary |
---|---|
public Ref readRef() throws SQLException Reads an SQL
|
readRowId | back to summary |
---|---|
public RowId readRowId() throws SQLException Reads an SQL
|
readShort | back to summary |
---|---|
public short readShort() throws SQLException Reads the next attribute in the stream and returns it as a
|
readSQLXML | back to summary |
---|---|
public SQLXML readSQLXML() throws SQLException Reads an SQL
|
readString | back to summary |
---|---|
public String readString() throws SQLException Reads the next attribute in the stream and returns it as a
|
readTime | back to summary |
---|---|
public Time readTime() throws SQLException Reads the next attribute in the stream and returns it as a
|
readTimestamp | back to summary |
---|---|
public Timestamp readTimestamp() throws SQLException Reads the next attribute in the stream and returns it as a
|
readURL | back to summary |
---|---|
public URL readURL() throws SQLException Reads an SQL
|
wasNull | back to summary |
---|---|
public boolean wasNull() throws SQLException Retrieves whether the last value read was SQL
|