code: public long position(final Clob searchstr,
                           long start) throws SQLException {
  
          final String ldata = data;
  
          checkValid(ldata);
  
          if (start < MIN_POS) {
              throw Util.outOfRangeArgument("start: " + start);
          }
  
          if (searchstr == null) {
              return -1;
          }
  
          final long dlen  = ldata.length();
          final long sslen = searchstr.length();
  
          start--;
  
  // This is potentially much less expensive than materializing a large
  // substring from some other vendor's CLOB.  Indeed, we should probably
  // do the comparison piecewise, using an in-memory buffer (or temp-files
  // when available), if it is detected that the input CLOB is very long.
          if (start > dlen - sslen) {
              return -1;
          }
  
          // by now, we know sslen and start are both < Integer.MAX_VALUE
          String s;
  
          if (searchstr instanceof JDBCClob) {
              s = ((JDBCClob) searchstr).data();
          } else {
              s = searchstr.getSubString(1L, (int) sslen);
          }
  
          final int pos = ldata.indexOf(s, (int) start);
  
          return (pos < 0) ? -1
                           : pos + 1;
      }
docs: Retrieves the character position at which the specified
  <code>Clob</code> object <code>searchstr</code> appears in this
  <code>Clob</code> object.  The search begins at position
  <code>start</code>.
  
  @param searchstr the <code>Clob</code> object for which to search
  @param start the position at which to begin searching; the first
  position is 1
  @return the position at which the <code>Clob</code> object appears
  or -1 if it is not present; the first position is 1
  @exception SQLException if there is an error accessing the
  <code>CLOB</code> value or if start is less than 1
  @exception SQLFeatureNotSupportedException if the JDBC driver does not support
  this method
  @since JDK 1.2, HSQLDB 1.7.2