code: public long position(final byte[] pattern, final long start) throws SQLException {
          if (start < 1) {
              throw SQLExceptionMapper.getSQLException("Start should be > 0, first position is 1.");
          }
          if (start > actualSize) {
              throw SQLExceptionMapper.getSQLException("Start should be <= " + actualSize);
          }
          final long actualStart = start - 1;
          for (int i = (int) actualStart; i < actualSize; i++) {
              if (blobContent[i] == pattern[0]) {
                  boolean isEqual = true;
                  for (int j = 1; j < pattern.length; j++) {
                      if (i + j >= actualSize) {
                          return -1;
                      }
                      if (blobContent[i + j] != pattern[j]) {
                          isEqual = false;
                      }
                  }
                  if (isEqual) {
                      return i + 1;
                  }
              }
          }
          return -1;
      }
docs: Retrieves the byte position at which the specified byte array <code>pattern</code> begins within the
  <code>BLOB</code> value that this <code>Blob</code> object represents.  The search for <code>pattern</code>
  begins at position <code>start</code>.
  
  @param pattern the byte array for which to search
  @param start   the position at which to begin searching; the first position is 1
  @return the position at which the pattern appears, else -1