/** * 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 SQL <code>BLOB</code> value at which * to start writing. The first position is <code>1</code>; * must not be less than <code>1</code> nor greater than * the length of this <code>SerialBlob</code> object. * @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 SerialException if there is an error accessing the * <code>BLOB</code> value; or if an invalid position is set; if an * invalid offset value is set; * if {@code free} had previously been called on this object * @throws SQLException if there is an error accessing the <code>BLOB</code> * value from the database * @see #getBytes */ public int setBytes(long pos, byte[] bytes) throws SerialException, SQLException { return (setBytes(pos, bytes, 0, bytes.length)); }