org.postgresql.pljava.jdbc
Class SQLInputFromChunk

java.lang.Object
  extended by org.postgresql.pljava.jdbc.SQLInputFromChunk
All Implemented Interfaces:
SQLInput

public class SQLInputFromChunk
extends Object
implements SQLInput

The SQLInputToChunk uses JNI to read from memory that has been allocated by the PostgreSQL backend. A user should never make an attempt to create an instance of this class. Only internal JNI routines can do that. An instance is propagated in a call from the internal JNI layer to the Java layer will only survive during that single call. The handle of the instance will be invalidated when the call returns and subsequent use of the instance will yield a SQLException with the message "Stream is closed".

Author:
Thomas Hallgren

Constructor Summary
SQLInputFromChunk(long handle, int chunkSize)
           
 
Method Summary
 Array readArray()
           
 InputStream readAsciiStream()
           
 BigDecimal readBigDecimal()
           
 InputStream readBinaryStream()
           
 Blob readBlob()
           
 boolean readBoolean()
           
 byte readByte()
           
 byte[] readBytes()
           
 Reader readCharacterStream()
           
 Clob readClob()
           
 Date readDate()
           
 double readDouble()
           
 float readFloat()
           
 int readInt()
           
 long readLong()
           
 Object readObject()
           
 Ref readRef()
           
 short readShort()
           
 String readString()
           
 Time readTime()
           
 Timestamp readTimestamp()
           
 URL readURL()
           
 boolean wasNull()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLInputFromChunk

public SQLInputFromChunk(long handle,
                         int chunkSize)
Method Detail

readArray

public Array readArray()
                throws SQLException
Specified by:
readArray in interface SQLInput
Throws:
SQLException

readAsciiStream

public InputStream readAsciiStream()
                            throws SQLException
Specified by:
readAsciiStream in interface SQLInput
Throws:
SQLException

readBigDecimal

public BigDecimal readBigDecimal()
                          throws SQLException
Specified by:
readBigDecimal in interface SQLInput
Throws:
SQLException

readBinaryStream

public InputStream readBinaryStream()
                             throws SQLException
Specified by:
readBinaryStream in interface SQLInput
Throws:
SQLException

readBlob

public Blob readBlob()
              throws SQLException
Specified by:
readBlob in interface SQLInput
Throws:
SQLException

readBoolean

public boolean readBoolean()
                    throws SQLException
Specified by:
readBoolean in interface SQLInput
Throws:
SQLException

readByte

public byte readByte()
              throws SQLException
Specified by:
readByte in interface SQLInput
Throws:
SQLException

readBytes

public byte[] readBytes()
                 throws SQLException
Specified by:
readBytes in interface SQLInput
Throws:
SQLException

readCharacterStream

public Reader readCharacterStream()
                           throws SQLException
Specified by:
readCharacterStream in interface SQLInput
Throws:
SQLException

readClob

public Clob readClob()
              throws SQLException
Specified by:
readClob in interface SQLInput
Throws:
SQLException

readDate

public Date readDate()
              throws SQLException
Specified by:
readDate in interface SQLInput
Throws:
SQLException

readDouble

public double readDouble()
                  throws SQLException
Specified by:
readDouble in interface SQLInput
Throws:
SQLException

readFloat

public float readFloat()
                throws SQLException
Specified by:
readFloat in interface SQLInput
Throws:
SQLException

readInt

public int readInt()
            throws SQLException
Specified by:
readInt in interface SQLInput
Throws:
SQLException

readLong

public long readLong()
              throws SQLException
Specified by:
readLong in interface SQLInput
Throws:
SQLException

readObject

public Object readObject()
                  throws SQLException
Specified by:
readObject in interface SQLInput
Throws:
SQLException

readRef

public Ref readRef()
            throws SQLException
Specified by:
readRef in interface SQLInput
Throws:
SQLException

readShort

public short readShort()
                throws SQLException
Specified by:
readShort in interface SQLInput
Throws:
SQLException

readString

public String readString()
                  throws SQLException
Specified by:
readString in interface SQLInput
Throws:
SQLException

readTime

public Time readTime()
              throws SQLException
Specified by:
readTime in interface SQLInput
Throws:
SQLException

readTimestamp

public Timestamp readTimestamp()
                        throws SQLException
Specified by:
readTimestamp in interface SQLInput
Throws:
SQLException

readURL

public URL readURL()
            throws SQLException
Specified by:
readURL in interface SQLInput
Throws:
SQLException

wasNull

public boolean wasNull()
                throws SQLException
Specified by:
wasNull in interface SQLInput
Throws:
SQLException