public long addQuery(byte[] queryText,int queryTextLength,int numberOfMatches,byte[] matchesText,int matchesTextLength,int[][] match2Classification2Id,long mateLocation) throws IOException {
  final long location=readerWriter.getPosition();
  if (isPairedReads)   readerWriter.writeLong(mateLocation);
  readerWriter.writeString(queryText,0,queryTextLength);
  readerWriter.writeInt(numberOfMatches);
  for (int i=0; i < numberOfMatches; i++) {
    for (int j=0; j < numberOfClassificationNames; j++) {
      readerWriter.writeInt(match2Classification2Id[i][j]);
    }
  }
  readerWriter.writeString(matchesText,0,matchesTextLength);
  this.totalNumberOfReads++;
  this.totalNumberOfMatches+=numberOfMatches;
  return location;
}

public long addQuery ( byte [ ] queryText , int queryTextLength , int numberOfMatches , byte [ ] matchesText , int matchesTextLength , int [ ] [ ] match2Classification2Id , long mateLocation ) throws IOException { final long location = readerWriter . getPosition ( ) ; if ( isPairedReads ) readerWriter . writeLong ( mateLocation ) ; readerWriter . writeString ( queryText , 0 , queryTextLength ) ; readerWriter . writeInt ( numberOfMatches ) ; for ( int i = 0 ; i < numberOfMatches ; i ++ ) { for ( int j = 0 ; j < numberOfClassificationNames ; j ++ ) { readerWriter . writeInt ( match2Classification2Id [ i ] [ j ] ) ; } } readerWriter . writeString ( matchesText , 0 , matchesTextLength ) ; this . totalNumberOfReads ++ ; this . totalNumberOfMatches += numberOfMatches ; return location ; }
add a query and its matches to the file
