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 void
free()
InputStream
getBinaryStream()
InputStream
getBinaryStream(long pos, long length)
byte[]
getBytes(long pos, int length)
int
getOid()
long
length()
long
position(byte[] pattern, long start)
long
position(Blob pattern, long start)
OutputStream
setBinaryStream(long pos)
int
setBytes(long pos, byte[] bytes)
int
setBytes(long pos, byte[] bytes, int offset, int len)
void
truncate(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:
length
in interfaceBlob
- Throws:
SQLException
-
getBytes
public byte[] getBytes(long pos, int length) throws SQLException
- Specified by:
getBytes
in interfaceBlob
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream() throws SQLException
- Specified by:
getBinaryStream
in interfaceBlob
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(long pos, long length) throws SQLException
- Specified by:
getBinaryStream
in interfaceBlob
- Throws:
SQLException
-
position
public long position(byte[] pattern, long start) throws SQLException
- Specified by:
position
in interfaceBlob
- Throws:
SQLException
-
position
public long position(Blob pattern, long start) throws SQLException
- Specified by:
position
in interfaceBlob
- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes) throws SQLException
- Specified by:
setBytes
in interfaceBlob
- Throws:
SQLException
-
setBytes
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException
- Specified by:
setBytes
in interfaceBlob
- Throws:
SQLException
-
setBinaryStream
public OutputStream setBinaryStream(long pos) throws SQLException
- Specified by:
setBinaryStream
in interfaceBlob
- Throws:
SQLException
-
truncate
public void truncate(long len) throws SQLException
- Specified by:
truncate
in interfaceBlob
- Throws:
SQLException
-
free
public void free() throws SQLException
- Specified by:
free
in interfaceBlob
- Throws:
SQLException
-
-