public interface SQLInput
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 | 
|---|---|
| Array | readArray()Reads an SQL  ARRAYvalue from the stream and returns it as anArrayobject in the Java programming language. | 
| InputStream | readAsciiStream()Reads the next attribute in the stream and returns it as a stream of ASCII characters. | 
| BigDecimal | readBigDecimal()Reads the next attribute in the stream and returns it as a  java.math.BigDecimalobject in the Java programming language. | 
| InputStream | readBinaryStream()Reads the next attribute in the stream and returns it as a stream of uninterpreted
 bytes. | 
| Blob | readBlob()Reads an SQL  BLOBvalue from the stream and returns it as aBlobobject in the Java programming language. | 
| boolean | readBoolean()Reads the next attribute in the stream and returns it as a  booleanin the Java programming language. | 
| byte | readByte()Reads the next attribute in the stream and returns it as a  bytein the Java programming language. | 
| byte[] | readBytes()Reads the next attribute in the stream and returns it as an array of bytes
 in the Java programming language. | 
| Reader | readCharacterStream()Reads the next attribute in the stream and returns it as a stream of Unicode characters. | 
| Clob | readClob()Reads an SQL  CLOBvalue from the stream and returns it as aClobobject in the Java programming language. | 
| Date | readDate()Reads the next attribute in the stream and returns it as a  java.sql.Dateobject. | 
| double | readDouble()Reads the next attribute in the stream and returns it as a  doublein the Java programming language. | 
| float | readFloat()Reads the next attribute in the stream and returns it as a  floatin the Java programming language. | 
| int | readInt()Reads the next attribute in the stream and returns it as an  intin the Java programming language. | 
| long | readLong()Reads the next attribute in the stream and returns it as a  longin the Java programming language. | 
| NClob | readNClob()Reads an SQL  NCLOBvalue from the stream and returns it as aNClobobject in the Java programming language. | 
| String | readNString()Reads the next attribute in the stream and returns it as a  Stringin the Java programming language. | 
| Object | readObject()Reads the datum at the head of the stream and returns it as an
  Objectin the Java programming language. | 
| default <T> T | readObject(Class<T> type)Reads the next attribute in the stream and returns it as an
  Objectin the Java programming language. | 
| Ref | readRef()Reads an SQL  REFvalue from the stream and returns it as aRefobject in the Java programming language. | 
| RowId | readRowId()Reads an SQL  ROWIDvalue from the stream and returns it as aRowIdobject in the Java programming language. | 
| short | readShort()Reads the next attribute in the stream and returns it as a  shortin the Java programming language. | 
| SQLXML | readSQLXML()Reads an SQL  XMLvalue from the stream and returns it as aSQLXMLobject in the Java programming language. | 
| String | readString()Reads the next attribute in the stream and returns it as a  Stringin the Java programming language. | 
| Time | readTime()Reads the next attribute in the stream and returns it as a  java.sql.Timeobject. | 
| Timestamp | readTimestamp()Reads the next attribute in the stream and returns it as a  java.sql.Timestampobject. | 
| URL | readURL()Reads an SQL  DATALINKvalue from the stream and returns it as ajava.net.URLobject in the Java programming language. | 
| boolean | wasNull()Retrieves whether the last value read was SQL  NULL. | 
String readString() throws SQLException
String
 in the Java programming language.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodboolean readBoolean()
             throws SQLException
boolean
 in the Java programming language.NULL, returns falseSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodbyte readByte()
       throws SQLException
byte
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodshort readShort()
         throws SQLException
short
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodint readInt()
     throws SQLException
int
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodlong readLong()
       throws SQLException
long
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodfloat readFloat()
         throws SQLException
float
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methoddouble readDouble()
           throws SQLException
double
 in the Java programming language.NULL, returns 0SQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodBigDecimal readBigDecimal() throws SQLException
java.math.BigDecimal
 object in the Java programming language.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodbyte[] readBytes()
          throws SQLException
NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodDate readDate() throws SQLException
java.sql.Date object.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodTime readTime() throws SQLException
java.sql.Time object.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodTimestamp readTimestamp() throws SQLException
java.sql.Timestamp object.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodReader readCharacterStream() throws SQLException
NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodInputStream readAsciiStream() throws SQLException
NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodInputStream readBinaryStream() throws SQLException
NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodObject readObject() throws SQLException
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 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.
 If the stream's type map has an entry for that SQL type, the driver
 constructs an object of the appropriate class and calls the method
 SQLData.readSQL on that object, which reads additional data from the
 stream, using the protocol described for that method.
Object in the
 Java programming language;null if the datum is SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodRef readRef() throws SQLException
REF value from the stream and returns it as a
 Ref object in the Java programming language.Ref object representing the SQL REF value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodBlob readBlob() throws SQLException
BLOB value from the stream and returns it as a
 Blob object in the Java programming language.Blob object representing data of the SQL BLOB value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodClob readClob() throws SQLException
CLOB value from the stream and returns it as a
 Clob object in the Java programming language.Clob object representing data of the SQL CLOB value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodArray readArray() throws SQLException
ARRAY value from the stream and returns it as an
 Array object in the Java programming language.Array object representing data of the SQL
 ARRAY value at the head of the stream; null
 if the value read is SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodboolean wasNull()
         throws SQLException
NULL.true if the most recently read SQL value was SQL
 NULL; false otherwiseSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodURL readURL() throws SQLException
DATALINK value from the stream and returns it as a
 java.net.URL object in the Java programming language.java.net.URL object.SQLException - if a database access error occurs,
            or if a URL is malformedSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodNClob readNClob() throws SQLException
NCLOB value from the stream and returns it as a
 NClob object in the Java programming language.NClob object representing data of the SQL NCLOB value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodString readNString() throws SQLException
String
 in the Java programming language. It is intended for use when
 accessing  NCHAR,NVARCHAR
 and LONGNVARCHAR columns.NULL, returns nullSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodSQLXML readSQLXML() throws SQLException
XML value from the stream and returns it as a
 SQLXML object in the Java programming language.SQLXML object representing data of the SQL XML value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methodRowId readRowId() throws SQLException
ROWID value from the stream and returns it as a
 RowId object in the Java programming language.RowId object representing data of the SQL ROWID value
 at the head of the stream; null if the value read is
 SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this methoddefault <T> T readObject(Class<T> type) throws SQLException
Object in the Java programming language. The
 actual type of the object returned is determined by the specified
 Java data type, 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 attribute at the head of the stream is an SQL NULL
 the method returns null. If the attribute is an SQL
 structured or distinct
 type, it determines the SQL type of the attribute at the head of the stream.
 If the stream's type map has an entry for that SQL type, the driver
 constructs an object of the appropriate class and calls the method
 SQLData.readSQL on that object, which reads additional data from the
 stream, using the protocol described for that method.
 The default implementation will throw SQLFeatureNotSupportedException
T - the type of the class modeled by this Class objecttype - Class representing the Java data type to convert the attribute to.Object in the
 Java programming language;null if the attribute is SQL NULLSQLException - if a database access error occursSQLFeatureNotSupportedException - if the JDBC driver does not support
 this method Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2023, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.