code: public InputStream getBinaryStream(long pos,
                                         long length) throws SQLException {
  
          final byte[] ldata = data;
  
          checkValid(ldata);
  
          final int dlen = ldata.length;
  
          if (pos < MIN_POS || pos > dlen) {
              throw Util.outOfRangeArgument("pos: " + pos);
          }
  
          pos--;
  
          if (length < 0 || length > dlen - pos) {
              throw Util.outOfRangeArgument("length: " + length);
          }
  
          if (pos == 0 && length == dlen) {
              return new ByteArrayInputStream(ldata);
          }
  
          // Let client decide on policy.
          //
          // Zero-copy is (possibly much) faster because it does
          // not allocate extra memory and does not involve copy
          // processing.
          //
          // However, because it could lead to unexpected memory,
          // stress, it is not polite to always pass back a stream
          // whose buffer is the full size required to represent the
          // underlying BLOB value.
  //        if (isGetBinaryStreamUsesCopy()) {
          final byte[] out = new byte[(int) length];
  
          System.arraycopy(ldata, (int) pos, out, 0, (int) length);
  
          return new ByteArrayInputStream(out);
  
  //        } else {
  //            return new BinaryInputStream(ldata, pos, 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 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>
  
  @exception SQLFeatureNotSupportedException if the JDBC driver does not support
  this method
  @since JDK 1.6, HSQLDB 1.9.0