javax.sql.rowset.serial
Class SQLInputImpl

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sql.rowset.serial.SQLInputImpl
All Implemented Interfaces:
SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput

public class SQLInputImpl
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput

An input stream used for custom mapping user-defined types (UDTs). An SQLInputImpl object is an input stream that contains a stream of values that are the attributes of a UDT.

This class is used by the driver behind the scenes when the method getObject is called on an SQL structured or distinct type that has a custom mapping; a programmer never invokes SQLInputImpl methods directly. They are provided here as a convenience for those who write RowSet implementations.

The SQLInputImpl class provides a set of reader methods analogous to the ResultSet getter methods. These methods make it possible to read the values in an SQLInputImpl object.

The method wasNull is used to determine whether the 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 UDT being custom mapped. The driver creates an instance of SQLInputImpl, 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 SQLInputImpl reader methods to read the attributes from the input stream.

See Also:
SQLData sample code for java.sql.SQLData definition code for java.sql.SQLData

Constructor Summary
SQLInputImpl sample code for javax.sql.rowset.serial.SQLInputImpl.SQLInputImpl(java.lang.Object[], java.util.Map) definition code for javax.sql.rowset.serial.SQLInputImpl.SQLInputImpl(java.lang.Object[], java.util.Map) (Object sample code for java.lang.Object definition code for java.lang.Object [] attributes, Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
          Creates an SQLInputImpl object initialized with the given array of attributes and the given type map.
 
Method Summary
 Array sample code for java.sql.Array definition code for java.sql.Array readArray sample code for javax.sql.rowset.serial.SQLInputImpl.readArray() definition code for javax.sql.rowset.serial.SQLInputImpl.readArray() ()
          Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
 InputStream sample code for java.io.InputStream definition code for java.io.InputStream readAsciiStream sample code for javax.sql.rowset.serial.SQLInputImpl.readAsciiStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readAsciiStream() ()
          Returns the next attribute in this SQLInputImpl object as a stream of ASCII characters.
 BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal readBigDecimal sample code for javax.sql.rowset.serial.SQLInputImpl.readBigDecimal() definition code for javax.sql.rowset.serial.SQLInputImpl.readBigDecimal() ()
          Retrieves the next attribute in this SQLInputImpl object as a java.math.BigDecimal.
 InputStream sample code for java.io.InputStream definition code for java.io.InputStream readBinaryStream sample code for javax.sql.rowset.serial.SQLInputImpl.readBinaryStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readBinaryStream() ()
          Returns the next attribute in this SQLInputImpl object as a stream of uninterpreted bytes.
 Blob sample code for java.sql.Blob definition code for java.sql.Blob readBlob sample code for javax.sql.rowset.serial.SQLInputImpl.readBlob() definition code for javax.sql.rowset.serial.SQLInputImpl.readBlob() ()
          Retrieves the BLOB value at the head of this SQLInputImpl object as a Blob object in the Java programming language.
 boolean readBoolean sample code for javax.sql.rowset.serial.SQLInputImpl.readBoolean() definition code for javax.sql.rowset.serial.SQLInputImpl.readBoolean() ()
          Retrieves the next attribute in this SQLInputImpl object as a boolean in the Java programming language.
 byte readByte sample code for javax.sql.rowset.serial.SQLInputImpl.readByte() definition code for javax.sql.rowset.serial.SQLInputImpl.readByte() ()
          Retrieves the next attribute in this SQLInputImpl object as a byte in the Java programming language.
 byte[] readBytes sample code for javax.sql.rowset.serial.SQLInputImpl.readBytes() definition code for javax.sql.rowset.serial.SQLInputImpl.readBytes() ()
          Retrieves the next attribute in this SQLInputImpl object as an array of bytes.
 Reader sample code for java.io.Reader definition code for java.io.Reader readCharacterStream sample code for javax.sql.rowset.serial.SQLInputImpl.readCharacterStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readCharacterStream() ()
          Retrieves the next attribute in this SQLInputImpl object as a stream of Unicode characters.
 Clob sample code for java.sql.Clob definition code for java.sql.Clob readClob sample code for javax.sql.rowset.serial.SQLInputImpl.readClob() definition code for javax.sql.rowset.serial.SQLInputImpl.readClob() ()
          Retrieves the CLOB value at the head of this SQLInputImpl object as a Clob object in the Java programming language.
 Date sample code for java.sql.Date definition code for java.sql.Date readDate sample code for javax.sql.rowset.serial.SQLInputImpl.readDate() definition code for javax.sql.rowset.serial.SQLInputImpl.readDate() ()
          Retrieves the next attribute in this SQLInputImpl as a java.sql.Date object.
 double readDouble sample code for javax.sql.rowset.serial.SQLInputImpl.readDouble() definition code for javax.sql.rowset.serial.SQLInputImpl.readDouble() ()
          Retrieves the next attribute in this SQLInputImpl object as a double in the Java programming language.
 float readFloat sample code for javax.sql.rowset.serial.SQLInputImpl.readFloat() definition code for javax.sql.rowset.serial.SQLInputImpl.readFloat() ()
          Retrieves the next attribute in this SQLInputImpl object as a float in the Java programming language.
 int readInt sample code for javax.sql.rowset.serial.SQLInputImpl.readInt() definition code for javax.sql.rowset.serial.SQLInputImpl.readInt() ()
          Retrieves the next attribute in this SQLInputImpl object as an int in the Java programming language.
 long readLong sample code for javax.sql.rowset.serial.SQLInputImpl.readLong() definition code for javax.sql.rowset.serial.SQLInputImpl.readLong() ()
          Retrieves the next attribute in this SQLInputImpl object as a long in the Java programming language.
 Object sample code for java.lang.Object definition code for java.lang.Object readObject sample code for javax.sql.rowset.serial.SQLInputImpl.readObject() definition code for javax.sql.rowset.serial.SQLInputImpl.readObject() ()
          Retrieves the value at the head of this SQLInputImpl object as an Object in the Java programming language.
 Ref sample code for java.sql.Ref definition code for java.sql.Ref readRef sample code for javax.sql.rowset.serial.SQLInputImpl.readRef() definition code for javax.sql.rowset.serial.SQLInputImpl.readRef() ()
          Retrieves the value at the head of this SQLInputImpl object as a Ref object in the Java programming language.
 short readShort sample code for javax.sql.rowset.serial.SQLInputImpl.readShort() definition code for javax.sql.rowset.serial.SQLInputImpl.readShort() ()
          Retrieves the next attribute in this SQLInputImpl object as a short in the Java programming language.
 String sample code for java.lang.String definition code for java.lang.String readString sample code for javax.sql.rowset.serial.SQLInputImpl.readString() definition code for javax.sql.rowset.serial.SQLInputImpl.readString() ()
          Retrieves the next attribute in this SQLInputImpl object as a String in the Java programming language.
 Time sample code for java.sql.Time definition code for java.sql.Time readTime sample code for javax.sql.rowset.serial.SQLInputImpl.readTime() definition code for javax.sql.rowset.serial.SQLInputImpl.readTime() ()
          Retrieves the next attribute in this SQLInputImpl object as a java.sql.Time object.
 Timestamp sample code for java.sql.Timestamp definition code for java.sql.Timestamp readTimestamp sample code for javax.sql.rowset.serial.SQLInputImpl.readTimestamp() definition code for javax.sql.rowset.serial.SQLInputImpl.readTimestamp() ()
          Retrieves the next attribute in this SQLInputImpl object as a java.sql.Timestamp object.
 URL sample code for java.net.URL definition code for java.net.URL readURL sample code for javax.sql.rowset.serial.SQLInputImpl.readURL() definition code for javax.sql.rowset.serial.SQLInputImpl.readURL() ()
          Reads an SQL DATALINK value from the stream and returns it as an URL object in the Java programming language.
 boolean wasNull sample code for javax.sql.rowset.serial.SQLInputImpl.wasNull() definition code for javax.sql.rowset.serial.SQLInputImpl.wasNull() ()
          Ascertains whether the last value read from this SQLInputImpl object was null.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

SQLInputImpl sample code for javax.sql.rowset.serial.SQLInputImpl(java.lang.Object[], java.util.Map<java.lang.String, java.lang.Class<?>>) definition code for javax.sql.rowset.serial.SQLInputImpl(java.lang.Object[], java.util.Map<java.lang.String, java.lang.Class<?>>)

public SQLInputImpl(Object sample code for java.lang.Object definition code for java.lang.Object [] attributes,
                    Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,Class sample code for java.lang.Class definition code for java.lang.Class <?>> map)
             throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Creates an SQLInputImpl object initialized with the given array of attributes and the given type map. If any of the attributes is a UDT whose name is in an entry in the type map, the attribute will be mapped according to the corresponding SQLData implementation.

Parameters:
attributes - an array of Object instances in which each element is an attribute of a UDT. The order of the attributes in the array is the same order in which the attributes were defined in the UDT definition.
map - a java.util.Map object containing zero or more entries, with each entry consisting of 1) a String giving the fully qualified name of the UDT and 2) the Class object for the SQLData implementation that defines how the UDT is to be mapped
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the attributes or the map is a null value
Method Detail

readString sample code for javax.sql.rowset.serial.SQLInputImpl.readString() definition code for javax.sql.rowset.serial.SQLInputImpl.readString()

public String sample code for java.lang.String definition code for java.lang.String  readString()
                  throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a String in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readString sample code for java.sql.SQLInput.readString() definition code for java.sql.SQLInput.readString() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no further values in the stream.

readBoolean sample code for javax.sql.rowset.serial.SQLInputImpl.readBoolean() definition code for javax.sql.rowset.serial.SQLInputImpl.readBoolean()

public boolean readBoolean()
                    throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a boolean in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readBoolean sample code for java.sql.SQLInput.readBoolean() definition code for java.sql.SQLInput.readBoolean() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no further values in the stream.

readByte sample code for javax.sql.rowset.serial.SQLInputImpl.readByte() definition code for javax.sql.rowset.serial.SQLInputImpl.readByte()

public byte readByte()
              throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a byte in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readByte sample code for java.sql.SQLInput.readByte() definition code for java.sql.SQLInput.readByte() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no further values in the stream

readShort sample code for javax.sql.rowset.serial.SQLInputImpl.readShort() definition code for javax.sql.rowset.serial.SQLInputImpl.readShort()

public short readShort()
                throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a short in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readShort sample code for java.sql.SQLInput.readShort() definition code for java.sql.SQLInput.readShort() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readInt sample code for javax.sql.rowset.serial.SQLInputImpl.readInt() definition code for javax.sql.rowset.serial.SQLInputImpl.readInt()

public int readInt()
            throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as an int in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readInt sample code for java.sql.SQLInput.readInt() definition code for java.sql.SQLInput.readInt() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readLong sample code for javax.sql.rowset.serial.SQLInputImpl.readLong() definition code for javax.sql.rowset.serial.SQLInputImpl.readLong()

public long readLong()
              throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a long in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readLong sample code for java.sql.SQLInput.readLong() definition code for java.sql.SQLInput.readLong() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readFloat sample code for javax.sql.rowset.serial.SQLInputImpl.readFloat() definition code for javax.sql.rowset.serial.SQLInputImpl.readFloat()

public float readFloat()
                throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a float in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readFloat sample code for java.sql.SQLInput.readFloat() definition code for java.sql.SQLInput.readFloat() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readDouble sample code for javax.sql.rowset.serial.SQLInputImpl.readDouble() definition code for javax.sql.rowset.serial.SQLInputImpl.readDouble()

public double readDouble()
                  throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a double in the Java programming language.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readDouble sample code for java.sql.SQLInput.readDouble() definition code for java.sql.SQLInput.readDouble() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readBigDecimal sample code for javax.sql.rowset.serial.SQLInputImpl.readBigDecimal() definition code for javax.sql.rowset.serial.SQLInputImpl.readBigDecimal()

public BigDecimal sample code for java.math.BigDecimal definition code for java.math.BigDecimal  readBigDecimal()
                          throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a java.math.BigDecimal.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readBigDecimal sample code for java.sql.SQLInput.readBigDecimal() definition code for java.sql.SQLInput.readBigDecimal() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readBytes sample code for javax.sql.rowset.serial.SQLInputImpl.readBytes() definition code for javax.sql.rowset.serial.SQLInputImpl.readBytes()

public byte[] readBytes()
                 throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as an array of bytes.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readBytes sample code for java.sql.SQLInput.readBytes() definition code for java.sql.SQLInput.readBytes() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readDate sample code for javax.sql.rowset.serial.SQLInputImpl.readDate() definition code for javax.sql.rowset.serial.SQLInputImpl.readDate()

public Date sample code for java.sql.Date definition code for java.sql.Date  readDate()
              throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl as a java.sql.Date object.

This method does not perform type-safe checking to determine if the returned type is the expected type; this responsibility is delegated to the UDT mapping as defined by a SQLData implementation.

Specified by:
readDate sample code for java.sql.SQLInput.readDate() definition code for java.sql.SQLInput.readDate() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the next attribute in this SQLInputImpl object; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position or if there are no more values in the stream

readTime sample code for javax.sql.rowset.serial.SQLInputImpl.readTime() definition code for javax.sql.rowset.serial.SQLInputImpl.readTime()

public Time sample code for java.sql.Time definition code for java.sql.Time  readTime()
              throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a java.sql.Time object.

This method does not perform type-safe checking to determine if the returned type is the expected type as this responsibility is delegated to the UDT mapping as implemented by a SQLData implementation.

Specified by:
readTime sample code for java.sql.SQLInput.readTime() definition code for java.sql.SQLInput.readTime() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the attribute; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readTimestamp sample code for javax.sql.rowset.serial.SQLInputImpl.readTimestamp() definition code for javax.sql.rowset.serial.SQLInputImpl.readTimestamp()

public Timestamp sample code for java.sql.Timestamp definition code for java.sql.Timestamp  readTimestamp()
                        throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a java.sql.Timestamp object.

Specified by:
readTimestamp sample code for java.sql.SQLInput.readTimestamp() definition code for java.sql.SQLInput.readTimestamp() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the attribute; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readCharacterStream sample code for javax.sql.rowset.serial.SQLInputImpl.readCharacterStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readCharacterStream()

public Reader sample code for java.io.Reader definition code for java.io.Reader  readCharacterStream()
                           throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the next attribute in this SQLInputImpl object as a stream of Unicode characters.

This method does not perform type-safe checking to determine if the returned type is the expected type as this responsibility is delegated to the UDT mapping as implemented by a SQLData implementation.

Specified by:
readCharacterStream sample code for java.sql.SQLInput.readCharacterStream() definition code for java.sql.SQLInput.readCharacterStream() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the attribute; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readAsciiStream sample code for javax.sql.rowset.serial.SQLInputImpl.readAsciiStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readAsciiStream()

public InputStream sample code for java.io.InputStream definition code for java.io.InputStream  readAsciiStream()
                            throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Returns the next attribute in this SQLInputImpl object as a stream of ASCII characters.

This method does not perform type-safe checking to determine if the returned type is the expected type as this responsibility is delegated to the UDT mapping as implemented by a SQLData implementation.

Specified by:
readAsciiStream sample code for java.sql.SQLInput.readAsciiStream() definition code for java.sql.SQLInput.readAsciiStream() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the attribute; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readBinaryStream sample code for javax.sql.rowset.serial.SQLInputImpl.readBinaryStream() definition code for javax.sql.rowset.serial.SQLInputImpl.readBinaryStream()

public InputStream sample code for java.io.InputStream definition code for java.io.InputStream  readBinaryStream()
                             throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Returns the next attribute in this SQLInputImpl object as a stream of uninterpreted bytes.

This method does not perform type-safe checking to determine if the returned type is the expected type as this responsibility is delegated to the UDT mapping as implemented by a SQLData implementation.

Specified by:
readBinaryStream sample code for java.sql.SQLInput.readBinaryStream() definition code for java.sql.SQLInput.readBinaryStream() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the attribute; if the value is SQL NULL, return null
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readObject sample code for javax.sql.rowset.serial.SQLInputImpl.readObject() definition code for javax.sql.rowset.serial.SQLInputImpl.readObject()

public Object sample code for java.lang.Object definition code for java.lang.Object  readObject()
                  throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the value at the head of this SQLInputImpl object as an Object in the Java programming language. The actual type of the object returned is determined by the default mapping of SQL types to types in the Java programming language unless there is a custom mapping, in which case the type of the object returned is determined by this stream's type map.

The JDBC technology-enabled driver registers a type map with the stream before passing the stream to the application.

When the datum at the head of the stream is an SQL NULL, this method returns null. If the datum is an SQL structured or distinct type with a custom mapping, this method determines the SQL type of the datum at the head of the stream, constructs an object of the appropriate class, and calls the method SQLData.readSQL on that object. The readSQL method then calls the appropriate SQLInputImpl.readXXX methods to retrieve the attribute values from the stream.

Specified by:
readObject sample code for java.sql.SQLInput.readObject() definition code for java.sql.SQLInput.readObject() in interface SQLInput sample code for java.sql.SQLInput definition code for java.sql.SQLInput
Returns:
the value at the head of the stream as an Object in the Java programming language; null if the value is SQL NULL
Throws:
SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException - if the read position is located at an invalid position; or if there are no further values in the stream.

readRef sample code for javax.sql.rowset.serial.SQLInputImpl.readRef() definition code for javax.sql.rowset.serial.SQLInputImpl.readRef()

public Ref sample code for java.sql.Ref definition code for java.sql.Ref  readRef()
            throws SQLException sample code for java.sql.SQLException definition code for java.sql.SQLException 
Retrieves the value at the head of this SQLInputImpl object as a Ref object in the Java programming language.

Specified by:
readRef sample code for java.sql.SQLInput.readRef() definition code for java.sql.SQLInput.readRef() in interface SQLInput</