Package com.impossibl.postgres.jdbc
Class PGBlob
- java.lang.Object
-
- com.impossibl.postgres.jdbc.PGBlob
-
-
Constructor Summary
Constructors Constructor Description PGBlob(PGDirectConnection connection, int oid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfree()InputStreamgetBinaryStream()InputStreamgetBinaryStream(long pos, long length)byte[]getBytes(long pos, int length)intgetOid()longlength()longposition(byte[] pattern, long start)longposition(Blob pattern, long start)OutputStreamsetBinaryStream(long pos)intsetBytes(long pos, byte[] bytes)intsetBytes(long pos, byte[] bytes, int offset, int len)voidtruncate(long len)
-
-
-
Constructor Detail
-
PGBlob
public PGBlob(PGDirectConnection connection, int oid) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
getOid
public int getOid()
-
length
public long length() throws SQLException- Specified by:
lengthin interfaceBlob- Throws:
SQLException
-
getBytes
public byte[] getBytes(long pos, int length) throws SQLException- Specified by:
getBytesin interfaceBlob- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream() throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(long pos, long length) throws SQLException
- Specified by:
getBinaryStreamin interfaceBlob- Throws:
SQLException
-
position
public long position(byte[] pattern, long start) throws SQLException- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
position
public long position(Blob pattern, long start) throws SQLException
- Specified by:
positionin interfaceBlob- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException- Specified by:
setBytesin interfaceBlob- Throws:
SQLException
-
setBinaryStream
public OutputStream setBinaryStream(long pos) throws SQLException
- Specified by:
setBinaryStreamin interfaceBlob- Throws:
SQLException
-
truncate
public void truncate(long len) throws SQLException- Specified by:
truncatein interfaceBlob- Throws:
SQLException
-
free
public void free() throws SQLException- Specified by:
freein interfaceBlob- Throws:
SQLException
-
-