is new.
public interface SQLInput
An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type. This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes 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.
| Method Summary | |
|---|---|
| Array |
readArray
() Reads an SQL ARRAY value from the stream and returns it as an Array object 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.BigDecimal object 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 BLOB value from the stream and returns it as a Blob object in the Java programming language. |
| boolean |
readBoolean
() Reads the next attribute in the stream and returns it as a boolean in the Java programming language. |
| byte |
readByte
() Reads the next attribute in the stream and returns it as a byte in 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 CLOB value from the stream and returns it as a Clob object in the Java programming language. |
| Date |
readDate
() Reads the next attribute in the stream and returns it as a java.sql.Date object. |
| double |
readDouble
() Reads the next attribute in the stream and returns it as a double in the Java programming language. |
| float |
readFloat
() Reads the next attribute in the stream and returns it as a float in the Java programming language. |
| int |
readInt
() Reads the next attribute in the stream and returns it as an int in the Java programming language. |
| long |
readLong
() Reads the next attribute in the stream and returns it as a long in the Java programming language. |
| NClob |
readNClob
() Reads an SQL NCLOB value from the stream and returns it as a NClob object in the Java programming language. |
| String |
readNString
() Reads the next attribute in the stream and returns it as a String in the Java programming language. |
| Object |
readObject
() Reads the datum at the head of the stream and returns it as an Object in the Java programming language. |
| Ref |
readRef
() Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language. |
| RowId |
readRowId
() Reads an SQL ROWID value from the stream and returns it as a RowId object in the Java programming language. |
| short |
readShort
() Reads the next attribute in the stream and returns it as a short in the Java programming language. |
| SQLXML |
readSQLXML
() Reads an SQL XML value from the stream and returns it as a SQLXML object in the Java programming language. |
| String |
readString
() Reads the next attribute in the stream and returns it as a String in the Java programming language. |
| Time |
readTime
() Reads the next attribute in the stream and returns it as a java.sql.Time object. |
| Timestamp |
readTimestamp
() Reads the next attribute in the stream and returns it as a java.sql.Timestamp object. |
| URL |
readURL
() Reads an SQL DATALINK value from the stream and returns it as a java.net.URL object in the Java programming language. |
| boolean |
wasNull
() Retrieves whether the last value read was SQL NULL. |
| Method Detail |
|---|
String readString()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
boolean readBoolean()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
byte readByte()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
short readShort()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
int readInt()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
long readLong()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
float readFloat()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
double readDouble()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
BigDecimal readBigDecimal()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
byte[] readBytes()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Date readDate()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Time readTime()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Timestamp readTimestamp()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Reader readCharacterStream()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
InputStream readAsciiStream()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
InputStream readBinaryStream()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Object readObject()
throws SQLException
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.
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Ref readRef()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Blob readBlob()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Clob readClob()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
Array readArray()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
boolean wasNull()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
Since:
1.2
URL readURL()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
NClob readNClob()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
String readNString()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
SQLXML readSQLXML()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method
RowId readRowId()
throws SQLException
SQLFeatureNotSupportedException
- if the JDBC driver does not support this method