code: public OutputStream setBinaryStream(final long pos) throws SQLException {
      if (pos < 1) {
        throw ExceptionMapper.getSqlException("Invalid position in blob");
      }
      if (offset > 0) {
        byte[] tmp = new byte[length];
        System.arraycopy(data, offset, tmp, 0, length);
        data = tmp;
        offset = 0;
      }
      return new BlobOutputStream(this, (int) (pos - 1) + offset);
    }
docs: Retrieves a stream that can be used to write to the <code>BLOB</code> value that this
  <code>Blob</code> object represents.  The stream begins at position <code>pos</code>. The
  bytes written to the stream will overwrite the existing bytes in the <code>Blob</code> object
  starting at the position <code>pos</code>.  If the end of the
  <code>Blob</code> value is reached while writing to the stream, then the length of the
  <code>Blob</code> value
  will be increased to accommodate the extra bytes.
  
  <p><b>Note:</b> If the value specified for <code>pos</code> is greater then the length+1 of the
  <code>BLOB</code>
  value then the behavior is undefined. Some JDBC drivers may throw a <code>SQLException</code>
  while other drivers may support this operation.</p>
  
  @param pos the position in the <code>BLOB</code> value at which to start writing; the first
  position is 1
  @return a <code>java.io.OutputStream</code> object to which data can be written
  @throws SQLException if there is an error accessing the <code>BLOB</code> value or if pos is
  less than 1
  @see #getBinaryStream
  @since 1.4