code: public int read(byte[] buf, int off, int len) throws SQLException {
      byte[] b = read(len);
      if (b.length < len) {
        len = b.length;
      }
      System.arraycopy(b, 0, buf, off, len);
      return len;
    }
docs: Reads some data from the object into an existing array.
  
  @param buf destination array
  @param off offset within array
  @param len number of bytes to read
  @return the number of bytes actually read
  @throws SQLException if a database-access error occurs.