code: public byte[] getBytes(final long pos, final int length) throws SQLException {
      if (pos < 1) {
        throw ExceptionMapper.getSqlException("Pos starts at 1");
      }
      final int offset = this.offset + (int) (pos - 1);
      byte[] result = new byte[length];
      System.arraycopy(data, offset, result, 0, Math.min(this.length - (int) (pos - 1), length));
      return result;
    }
docs: Retrieves all or part of the <code>BLOB</code> value that this <code>Blob</code> object
  represents, as an array of bytes.  This <code>byte</code> array contains up to
  <code>length</code> consecutive bytes starting at position
  <code>pos</code>.
  
  @param pos    the ordinal position of the first byte in the <code>BLOB</code> value to be
  extracted; the first byte is at position 1
  @param length the number of consecutive bytes to be copied; the value for length must be 0 or
  greater
  @return a byte array containing up to <code>length</code> consecutive bytes from the
  <code>BLOB</code> value designated by this <code>Blob</code> object, starting with the
  byte at position <code>pos</code>
  @throws SQLException if there is an error accessing the <code>BLOB</code> value; if pos is less
  than 1 or length is less than 0
  @see #setBytes
  @since 1.2