|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.postgresql.jdbc.AbstractBlobClob
public abstract class AbstractBlobClob
This class holds all of the methods common to both Blobs and Clobs.
Field Summary | |
---|---|
protected BaseConnection |
conn
|
Constructor Summary | |
---|---|
AbstractBlobClob(BaseConnection conn,
long oid)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BaseConnection conn
Constructor Detail |
---|
public AbstractBlobClob(BaseConnection conn, long oid) throws SQLException
SQLException
Method Detail |
---|
public void free() throws SQLException
SQLException
public void truncate(long len) throws SQLException
len
- maximum length
SQLException
- if operation failspublic long length() throws SQLException
SQLException
public byte[] getBytes(long pos, int length) throws SQLException
SQLException
public InputStream getBinaryStream() throws SQLException
SQLException
public OutputStream setBinaryStream(long pos) throws SQLException
SQLException
public long position(byte[] pattern, long start) throws SQLException
pattern
- A pattern of bytes to search the blob forstart
- The position to start reading from
SQLException
- if something wrong happenspublic long position(Blob pattern, long start) throws SQLException
pattern
- search patternstart
- start position
SQLException
- 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
SQLException
protected void addSubLO(LargeObject subLO)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |