| Modifier and Type | Field and Description |
|---|---|
protected BaseConnection |
conn |
| Constructor and Description |
|---|
AbstractBlobClob(BaseConnection conn,
long oid) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSubLO(LargeObject subLO) |
protected void |
assertPosition(long pos)
Throws an exception if the pos value exceeds the max value by which the large object API can
index.
|
protected void |
assertPosition(long pos,
long len)
Throws an exception if the pos value exceeds the max value by which the large object API can
index.
|
protected void |
checkFreed()
Checks that this LOB hasn't been free()d already.
|
void |
free() |
InputStream |
getBinaryStream() |
byte[] |
getBytes(long pos,
int length) |
protected LargeObject |
getLo(boolean forWrite) |
long |
length() |
long |
position(Blob pattern,
long start)
This is simply passing the byte value of the pattern Blob.
|
long |
position(byte[] pattern,
long start)
Iterate over the buffer looking for the specified pattern.
|
OutputStream |
setBinaryStream(long pos) |
void |
truncate(long len)
For Blobs this should be in bytes while for Clobs it should be in characters.
|
protected BaseConnection conn
public AbstractBlobClob(BaseConnection conn, long oid) throws SQLException
SQLExceptionpublic void free()
throws SQLException
SQLExceptionpublic void truncate(long len)
throws SQLException
len - maximum lengthSQLException - if operation failspublic long length()
throws SQLException
SQLExceptionpublic byte[] getBytes(long pos,
int length)
throws SQLException
SQLExceptionpublic InputStream getBinaryStream() throws SQLException
SQLExceptionpublic OutputStream setBinaryStream(long pos) throws SQLException
SQLExceptionpublic long position(byte[] pattern,
long start)
throws SQLException
pattern - A pattern of bytes to search the blob forstart - The position to start reading fromSQLException - if something wrong happenspublic long position(Blob pattern, long start) throws SQLException
pattern - search patternstart - start positionSQLException - if something goes wrongprotected void assertPosition(long pos)
throws SQLException
pos - Position to write at.SQLException - if something goes wrongprotected void assertPosition(long pos,
long len)
throws SQLException
pos - Position to write at.len - number of bytes to write.SQLException - if something goes wrongprotected void checkFreed()
throws SQLException
SQLException - if LOB has been freed.protected LargeObject getLo(boolean forWrite) throws SQLException
SQLExceptionprotected void addSubLO(LargeObject subLO)
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.