public static boolean matchName(byte[] queryName,int queryNameLength,byte[] line,int lineLength){
  int start=0;
  if (line[start] == '>' || line[0] == '@')   start++;
  while (Character.isWhitespace(line[start]) && start < lineLength)   start++;
  int end=start;
  while (!Character.isWhitespace(line[end]) && end < lineLength) {
    end++;
  }
  if (end - start != queryNameLength)   return false;
  for (int i=0; i < queryNameLength; i++) {
    if (queryName[i] != line[start + i])     return false;
  }
  return true;
}

public static boolean matchName ( byte [ ] queryName , int queryNameLength , byte [ ] line , int lineLength ) { int start = 0 ; if ( line [ start ] == '>' || line [ 0 ] == '@' ) start ++ ; while ( Character . isWhitespace ( line [ start ] ) && start < lineLength ) start ++ ; int end = start ; while ( ! Character . isWhitespace ( line [ end ] ) && end < lineLength ) { end ++ ; } if ( end - start != queryNameLength ) return false ; for ( int i = 0 ; i < queryNameLength ; i ++ ) { if ( queryName [ i ] != line [ start + i ] ) return false ; } return true ; }
match header line with query name
