- java.lang.Object
-
- org.postgresql.pljava.jdbc.SQLOutputToChunk
-
- All Implemented Interfaces:
SQLOutput
public class SQLOutputToChunk extends Object implements SQLOutput
The SQLOutputToChunk uses JNI to build a PostgreSQL StringInfo buffer in memory. 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 SQLOutputToChunk(long handle, ByteBuffer bb, boolean isJavaBasedScalar)
-
Method Summary
Modifier and Type Method Description void
writeArray(Array value)
void
writeAsciiStream(InputStream value)
void
writeBigDecimal(BigDecimal value)
void
writeBinaryStream(InputStream value)
void
writeBlob(Blob value)
void
writeBoolean(boolean value)
void
writeByte(byte value)
void
writeBytes(byte[] buffer)
void
writeCharacterStream(Reader value)
void
writeClob(Clob value)
void
writeDate(Date value)
void
writeDouble(double value)
void
writeFloat(float value)
void
writeInt(int value)
void
writeLong(long value)
void
writeNClob(NClob x)
void
writeNString(String x)
void
writeObject(SQLData value)
void
writeRef(Ref value)
void
writeRowId(RowId x)
void
writeShort(short value)
void
writeSQLXML(SQLXML x)
void
writeString(String value)
void
writeStruct(Struct value)
void
writeTime(Time value)
void
writeTimestamp(Timestamp value)
void
writeURL(URL value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.SQLOutput
writeObject
-
-
-
-
Constructor Detail
-
SQLOutputToChunk
public SQLOutputToChunk(long handle, ByteBuffer bb, boolean isJavaBasedScalar) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
writeArray
public void writeArray(Array value) throws SQLException
- Specified by:
writeArray
in interfaceSQLOutput
- Throws:
SQLException
-
writeAsciiStream
public void writeAsciiStream(InputStream value) throws SQLException
- Specified by:
writeAsciiStream
in interfaceSQLOutput
- Throws:
SQLException
-
writeBigDecimal
public void writeBigDecimal(BigDecimal value) throws SQLException
- Specified by:
writeBigDecimal
in interfaceSQLOutput
- Throws:
SQLException
-
writeBinaryStream
public void writeBinaryStream(InputStream value) throws SQLException
- Specified by:
writeBinaryStream
in interfaceSQLOutput
- Throws:
SQLException
-
writeBlob
public void writeBlob(Blob value) throws SQLException
- Specified by:
writeBlob
in interfaceSQLOutput
- Throws:
SQLException
-
writeBoolean
public void writeBoolean(boolean value) throws SQLException
- Specified by:
writeBoolean
in interfaceSQLOutput
- Throws:
SQLException
-
writeByte
public void writeByte(byte value) throws SQLException
- Specified by:
writeByte
in interfaceSQLOutput
- Throws:
SQLException
-
writeBytes
public void writeBytes(byte[] buffer) throws SQLException
- Specified by:
writeBytes
in interfaceSQLOutput
- Throws:
SQLException
-
writeCharacterStream
public void writeCharacterStream(Reader value) throws SQLException
- Specified by:
writeCharacterStream
in interfaceSQLOutput
- Throws:
SQLException
-
writeClob
public void writeClob(Clob value) throws SQLException
- Specified by:
writeClob
in interfaceSQLOutput
- Throws:
SQLException
-
writeDate
public void writeDate(Date value) throws SQLException
- Specified by:
writeDate
in interfaceSQLOutput
- Throws:
SQLException
-
writeDouble
public void writeDouble(double value) throws SQLException
- Specified by:
writeDouble
in interfaceSQLOutput
- Throws:
SQLException
-
writeFloat
public void writeFloat(float value) throws SQLException
- Specified by:
writeFloat
in interfaceSQLOutput
- Throws:
SQLException
-
writeInt
public void writeInt(int value) throws SQLException
- Specified by:
writeInt
in interfaceSQLOutput
- Throws:
SQLException
-
writeLong
public void writeLong(long value) throws SQLException
- Specified by:
writeLong
in interfaceSQLOutput
- Throws:
SQLException
-
writeObject
public void writeObject(SQLData value) throws SQLException
- Specified by:
writeObject
in interfaceSQLOutput
- Throws:
SQLException
-
writeRef
public void writeRef(Ref value) throws SQLException
- Specified by:
writeRef
in interfaceSQLOutput
- Throws:
SQLException
-
writeShort
public void writeShort(short value) throws SQLException
- Specified by:
writeShort
in interfaceSQLOutput
- Throws:
SQLException
-
writeString
public void writeString(String value) throws SQLException
- Specified by:
writeString
in interfaceSQLOutput
- Throws:
SQLException
-
writeStruct
public void writeStruct(Struct value) throws SQLException
- Specified by:
writeStruct
in interfaceSQLOutput
- Throws:
SQLException
-
writeTime
public void writeTime(Time value) throws SQLException
- Specified by:
writeTime
in interfaceSQLOutput
- Throws:
SQLException
-
writeTimestamp
public void writeTimestamp(Timestamp value) throws SQLException
- Specified by:
writeTimestamp
in interfaceSQLOutput
- Throws:
SQLException
-
writeURL
public void writeURL(URL value) throws SQLException
- Specified by:
writeURL
in interfaceSQLOutput
- Throws:
SQLException
-
writeNClob
public void writeNClob(NClob x) throws SQLException
- Specified by:
writeNClob
in interfaceSQLOutput
- Throws:
SQLException
-
writeNString
public void writeNString(String x) throws SQLException
- Specified by:
writeNString
in interfaceSQLOutput
- Throws:
SQLException
-
writeRowId
public void writeRowId(RowId x) throws SQLException
- Specified by:
writeRowId
in interfaceSQLOutput
- Throws:
SQLException
-
writeSQLXML
public void writeSQLXML(SQLXML x) throws SQLException
- Specified by:
writeSQLXML
in interfaceSQLOutput
- Throws:
SQLException
-
-