private int matchNextHeader(int i,String key){
  int size=_headerSize;
  int length=key.length();
  char[] keyBuf=_headerBuffer;
  char[] toLowerAscii=_toLowerAscii;
  for (; i < size; i++) {
    CharSegment header=_headerKeys[i];
    if (header.length() != length)     continue;
    int offset=header.offset();
    int j;
    for (j=0; j < length; j++) {
      char a=key.charAt(j);
      char b=keyBuf[offset + j];
      if (a == b) {
        continue;
      }
 else       if (toLowerAscii[a] != toLowerAscii[b]) {
        break;
      }
    }
    if (j == length) {
      return i;
    }
  }
  return -1;
}

private int matchNextHeader ( int i , String key ) { int size = _headerSize ; int length = key . length ( ) ; char [ ] keyBuf = _headerBuffer ; char [ ] toLowerAscii = _toLowerAscii ; for ( ; i < size ; i ++ ) { CharSegment header = _headerKeys [ i ] ; if ( header . length ( ) != length ) continue ; int offset = header . offset ( ) ; int j ; for ( j = 0 ; j < length ; j ++ ) { char a = key . charAt ( j ) ; char b = keyBuf [ offset + j ] ; if ( a == b ) { continue ; } else if ( toLowerAscii [ a ] != toLowerAscii [ b ] ) { break ; } } if ( j == length ) { return i ; } } return - 1 ; }
returns the index of the next header matching the key .
