|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SQLInput
The SQLInput interface defines operations which apply to a type of input stream which carries a series of values which represent an instance of an SQL structured type or SQL distinct type.
SQLInput interface is used for custom mapping of SQL User Defined Types (UDTs)to Java classes. It is used by JDBC drivers below the level of the public interfaces and application programs do not normally use the SQLInput methods directly. Reader methods such as readLong and readBytes provide means to read values from an SQLInput stream.
When the getObject method is called with an object which implements the SQLData interface, the JDBC driver determines the SQL type of the UDT being mapped by calling the SQLData.getSQLType method. The driver creates an instance of an SQLInput stream, filling the stream with the attributes of the UDT. The SQLInput stream is passed to the SQLData.readSQL method which then calls the SQLInput reader methods to read the attributes.
| Method Summary | |
|---|---|
Array |
readArray()
Returns the next attribute in the stream in the form of a java.sql.Array. |
InputStream |
readAsciiStream()
Returns the next attribute in the stream in the form of an ASCII character stream embodied as a java.io.InputStream. |
BigDecimal |
readBigDecimal()
Returns the next attribute in the stream in the form of a java.math.BigDecimal. |
InputStream |
readBinaryStream()
Returns the next attribute in the stream in the form of a stream of bytes embodied as a java.io.InputStream. |
Blob |
readBlob()
Returns the next attribute in the stream in the form of a java.sql.Blob. |
boolean |
readBoolean()
Returns the next attribute in the stream in the form of a boolean. |
byte |
readByte()
Returns the next attribute in the stream in the form of a byte. |
byte[] |
readBytes()
Returns the next attribute in the stream in the form of a byte array. |
Reader |
readCharacterStream()
Returns the next attribute in the stream in the form of a Unicode character stream embodied as a java.io.Reader. |
Clob |
readClob()
Returns the next attribute in the stream in the form of a java.sql.Clob. |
Date |
readDate()
Returns the next attribute in the stream in the form of a java.sql.Date. |
double |
readDouble()
Returns the next attribute in the stream in the form of a double. |
float |
readFloat()
Returns the next attribute in the stream in the form of a float. |
int |
readInt()
Returns the next attribute in the stream in the form of an int. |
long |
readLong()
Returns the next attribute in the stream in the form of a long. |
Object |
readObject()
Returns the next attribute in the stream in the form of a java.lang.Object. |
Ref |
readRef()
Returns the next attribute in the stream in the form of a java.sql.Ref. |
short |
readShort()
Returns the next attribute in the stream in the form of a short. |
String |
readString()
Returns the next attribute in the stream in the form of a String. |
Time |
readTime()
Returns the next attribute in the stream in the form of a java.sql.Time. |
Timestamp |
readTimestamp()
Returns the next attribute in the stream in the form of a java.sql.Timestamp. |
URL |
readURL()
Reads the next attribute in the stream (SQL DATALINK value) and returns it as a java.net.URL object. |
boolean |
wasNull()
Reports whether the last value read was SQL NULL. |
| Method Detail |
|---|
String readString()
throws SQLException
SQLException - if there is a database error
boolean readBoolean()
throws SQLException
SQLException - if there is a database error
byte readByte()
throws SQLException
SQLException - if there is a database error
short readShort()
throws SQLException
SQLException - if there is a database error
int readInt()
throws SQLException
SQLException - if there is a database error
long readLong()
throws SQLException
SQLException - if there is a database error
float readFloat()
throws SQLException
SQLException - if there is a database error
double readDouble()
throws SQLException
SQLException - if there is a database error
BigDecimal readBigDecimal()
throws SQLException
SQLException - if there is a database error
byte[] readBytes()
throws SQLException
SQLException - if there is a database error
Date readDate()
throws SQLException
SQLException - if there is a database error
Time readTime()
throws SQLException
SQLException - if there is a database error
Timestamp readTimestamp()
throws SQLException
SQLException - if there is a database error
Reader readCharacterStream()
throws SQLException
SQLException - if there is a database error
InputStream readAsciiStream()
throws SQLException
SQLException - if there is a database error
InputStream readBinaryStream()
throws SQLException
SQLException - if there is a database error
Object readObject()
throws SQLException
The type of the Object returned is determined by the type mapping for this JDBC driver, including any customized mappings in force. A type map is given to the SQLInput by the JDBC driver before the SQLInput is given to the application.
If the attribute is an SQL structured or distinct type, its SQL type is determined. If the streams type map contains an element for that SQL type, the driver creates an object of relevant type and invokes the method SQLData.readSQL on it, which reads supplementary data from the stream using whichever protocol is defined for that method.
SQLException - if there is a database error
Ref readRef()
throws SQLException
SQLException - if there is a database error
Blob readBlob()
throws SQLException
SQLException - if there is a database error
Clob readClob()
throws SQLException
SQLException - if there is a database error
Array readArray()
throws SQLException
SQLException - if there is a database error
boolean wasNull()
throws SQLException
SQLException - if there is a database error
URL readURL()
throws SQLException
SQLException - if there is a database error
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||