public static boolean matchName(String queryName,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 != queryName.length())   return false;
  for (int i=0; i < queryName.length(); i++) {
    if (queryName.charAt(i) != (char)line[start + i])     return false;
  }
  return true;
}

public static boolean matchName ( String queryName , 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 != queryName . length ( ) ) return false ; for ( int i = 0 ; i < queryName . length ( ) ; i ++ ) { if ( queryName . charAt ( i ) != ( char ) line [ start + i ] ) return false ; } return true ; }
match header line with query name
