public synchronized int setBytes(long pos,
                                     byte[] bytes) throws SQLException {

        if (!isInLimits(Long.MAX_VALUE, pos - 1, bytes.length)) {
            throw Util.outOfRangeArgument();
        }

        try {
            return blob.setBytes(session, pos - 1, bytes);
        } catch (HsqlException e) {
            throw Util.sqlException(e);
        }
    }
public synchronized int setBytes ( long pos , byte [ ] bytes ) throws SQLException { if ( ! isInLimits ( Long . MAX_VALUE , pos - 1 , bytes . length ) ) { throw Util . outOfRangeArgument ( ) ; } try { return blob . setBytes ( session , pos - 1 , bytes ) ; } catch ( HsqlException e ) { throw Util . sqlException ( e ) ; } }
Writes the given array of bytes to the <code>BLOB</code> value that
this <code>Blob</code> object represents, starting at position
<code>pos</code>, and returns the number of bytes written.

@param pos the position in the <code>BLOB</code> object at which to
start writing
@param bytes the array of bytes to be written to the
<code>BLOB</code> value that this <code>Blob</code> object
represents
@return the number of bytes written
@throws SQLException if there is an error accessing the
<code>BLOB</code> value