- java.lang.Object
-
- 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
Constructors Constructor Description SQLInputFromChunk(ByteBuffer bb, boolean isJavaBasedScalar)
-
Method Summary
Modifier and Type Method Description 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()
NClob
readNClob()
String
readNString()
Object
readObject()
Ref
readRef()
RowId
readRowId()
short
readShort()
SQLXML
readSQLXML()
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
-
Methods inherited from interface java.sql.SQLInput
readObject
-
-
-
-
Constructor Detail
-
SQLInputFromChunk
public SQLInputFromChunk(ByteBuffer bb, boolean isJavaBasedScalar) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
readArray
public Array readArray() throws SQLException
- Specified by:
readArray
in interfaceSQLInput
- Throws:
SQLException
-
readAsciiStream
public InputStream readAsciiStream() throws SQLException
- Specified by:
readAsciiStream
in interfaceSQLInput
- Throws:
SQLException
-
readBigDecimal
public BigDecimal readBigDecimal() throws SQLException
- Specified by:
readBigDecimal
in interfaceSQLInput
- Throws:
SQLException
-
readBinaryStream
public InputStream readBinaryStream() throws SQLException
- Specified by:
readBinaryStream
in interfaceSQLInput
- Throws:
SQLException
-
readBlob
public Blob readBlob() throws SQLException
- Specified by:
readBlob
in interfaceSQLInput
- Throws:
SQLException
-
readBoolean
public boolean readBoolean() throws SQLException
- Specified by:
readBoolean
in interfaceSQLInput
- Throws:
SQLException
-
readByte
public byte readByte() throws SQLException
- Specified by:
readByte
in interfaceSQLInput
- Throws:
SQLException
-
readBytes
public byte[] readBytes() throws SQLException
- Specified by:
readBytes
in interfaceSQLInput
- Throws:
SQLException
-
readCharacterStream
public Reader readCharacterStream() throws SQLException
- Specified by:
readCharacterStream
in interfaceSQLInput
- Throws:
SQLException
-
readClob
public Clob readClob() throws SQLException
- Specified by:
readClob
in interfaceSQLInput
- Throws:
SQLException
-
readDate
public Date readDate() throws SQLException
- Specified by:
readDate
in interfaceSQLInput
- Throws:
SQLException
-
readDouble
public double readDouble() throws SQLException
- Specified by:
readDouble
in interfaceSQLInput
- Throws:
SQLException
-
readFloat
public float readFloat() throws SQLException
- Specified by:
readFloat
in interfaceSQLInput
- Throws:
SQLException
-
readInt
public int readInt() throws SQLException
- Specified by:
readInt
in interfaceSQLInput
- Throws:
SQLException
-
readLong
public long readLong() throws SQLException
- Specified by:
readLong
in interfaceSQLInput
- Throws:
SQLException
-
readObject
public Object readObject() throws SQLException
- Specified by:
readObject
in interfaceSQLInput
- Throws:
SQLException
-
readRef
public Ref readRef() throws SQLException
- Specified by:
readRef
in interfaceSQLInput
- Throws:
SQLException
-
readShort
public short readShort() throws SQLException
- Specified by:
readShort
in interfaceSQLInput
- Throws:
SQLException
-
readString
public String readString() throws SQLException
- Specified by:
readString
in interfaceSQLInput
- Throws:
SQLException
-
readTime
public Time readTime() throws SQLException
- Specified by:
readTime
in interfaceSQLInput
- Throws:
SQLException
-
readTimestamp
public Timestamp readTimestamp() throws SQLException
- Specified by:
readTimestamp
in interfaceSQLInput
- Throws:
SQLException
-
readURL
public URL readURL() throws SQLException
- Specified by:
readURL
in interfaceSQLInput
- Throws:
SQLException
-
wasNull
public boolean wasNull() throws SQLException
- Specified by:
wasNull
in interfaceSQLInput
- Throws:
SQLException
-
readRowId
public RowId readRowId() throws SQLException
- Specified by:
readRowId
in interfaceSQLInput
- Throws:
SQLException
-
readSQLXML
public SQLXML readSQLXML() throws SQLException
- Specified by:
readSQLXML
in interfaceSQLInput
- Throws:
SQLException
-
readNString
public String readNString() throws SQLException
- Specified by:
readNString
in interfaceSQLInput
- Throws:
SQLException
-
readNClob
public NClob readNClob() throws SQLException
- Specified by:
readNClob
in interfaceSQLInput
- Throws:
SQLException
-
-