org.postgresql.jdbc3
Class AbstractJdbc3Blob

java.lang.Object
  extended by org.postgresql.jdbc2.AbstractJdbc2BlobClob
      extended by org.postgresql.jdbc2.AbstractJdbc2Blob
          extended by org.postgresql.jdbc3.AbstractJdbc3Blob
Direct Known Subclasses:
AbstractJdbc4Blob, Jdbc3Blob, Jdbc3gBlob

public abstract class AbstractJdbc3Blob
extends AbstractJdbc2Blob


Field Summary
 
Fields inherited from class org.postgresql.jdbc2.AbstractJdbc2BlobClob
conn, lo
 
Constructor Summary
AbstractJdbc3Blob(BaseConnection conn, long oid)
           
 
Method Summary
 int setBytes(long pos, byte[] bytes)
          Writes the given array of bytes to the BLOB value that this Blob object represents, starting at position pos, and returns the number of bytes written.
 int setBytes(long pos, byte[] bytes, int offset, int len)
          Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written.
 
Methods inherited from class org.postgresql.jdbc2.AbstractJdbc2BlobClob
assertPosition, assertPosition, checkFreed, free, getBinaryStream, getBytes, length, position, position, setBinaryStream, truncate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJdbc3Blob

public AbstractJdbc3Blob(BaseConnection conn,
                         long oid)
                  throws SQLException
Throws:
SQLException
Method Detail

setBytes

public int setBytes(long pos,
                    byte[] bytes)
             throws SQLException
Writes the given array of bytes to the BLOB value that this Blob object represents, starting at position pos, and returns the number of bytes written.

Parameters:
pos - the position in the BLOB object at which to start writing
bytes - the array of bytes to be written to the BLOB value that this Blob object represents
Returns:
the number of bytes written
Throws:
SQLException - if there is an error accessing the BLOB value
Since:
1.4
See Also:
AbstractJdbc2BlobClob.getBytes(long, int)

setBytes

public int setBytes(long pos,
                    byte[] bytes,
                    int offset,
                    int len)
             throws SQLException
Writes all or part of the given byte array to the BLOB value that this Blob object represents and returns the number of bytes written. Writing starts at position pos in the BLOB value; len bytes from the given byte array are written.

Parameters:
pos - the position in the BLOB object at which to start writing
bytes - the array of bytes to be written to this BLOB object
offset - the offset into the array bytes at which to start reading the bytes to be set
len - the number of bytes to be written to the BLOB value from the array of bytes bytes
Returns:
the number of bytes written
Throws:
SQLException - if there is an error accessing the BLOB value
Since:
1.4
See Also:
AbstractJdbc2BlobClob.getBytes(long, int)


Copyright © 2013. All Rights Reserved.