|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.postgresql.jdbc2.AbstractJdbc2BlobClob
public abstract class AbstractJdbc2BlobClob
This class holds all of the methods common to both Blobs and Clobs.
| Field Summary | |
|---|---|
protected BaseConnection |
conn
|
protected LargeObject |
lo
|
| Constructor Summary | |
|---|---|
AbstractJdbc2BlobClob(BaseConnection conn,
long oid)
|
|
| Method Summary | |
|---|---|
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)
|
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
protected LargeObject lo
| Constructor Detail |
|---|
public AbstractJdbc2BlobClob(BaseConnection conn,
long oid)
throws SQLException
SQLException| Method Detail |
|---|
public void free()
throws SQLException
SQLException
public void truncate(long len)
throws SQLException
SQLException
public 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 for.start - The position to start reading from.
SQLException
public long position(Blob pattern,
long start)
throws SQLException
SQLException
protected void assertPosition(long pos)
throws SQLException
pos - Position to write at.
SQLException
protected void assertPosition(long pos,
long len)
throws SQLException
pos - Position to write at.len - number of bytes to write.
SQLException
protected void checkFreed()
throws SQLException
SQLException - if LOB has been freed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||