code: public InputStream getBinaryStream(final long pos, final long length) throws SQLException {
          if (pos < 1 || pos > actualSize || pos + length > actualSize) {
              throw SQLExceptionMapper.getSQLException("Out of range");
          }
  
          return new ByteArrayInputStream(Utils.copyRange(blobContent,
                  (int) pos,
                  (int) length));
      }
docs: Returns an <code>InputStream</code> object that contains a partial <code>Blob</code> value, starting  with the
  byte specified by pos, which is length bytes in length.
  
  @param pos    the offset to the first byte of the partial value to be retrieved. The first byte in the
  <code>Blob</code> is at position 1
  @param length the length in bytes of the partial value to be retrieved
  @return <code>InputStream</code> through which the partial <code>Blob</code> value can be read.
  @throws java.sql.SQLException if pos is less than 1 or if pos is greater than the number of bytes in the
  <code>Blob</code> or if pos + length is greater than the number of bytes in the
  <code>Blob</code>