public void addToClassification(Integer classId,int size,List<Long> positions) throws IOException {
  numberOfClasses++;
  classificationIndexTmpFileWriter.writeInt(classId);
  if (size == positions.size())   classificationIndexTmpFileWriter.writeInt(size);
 else {
    classificationIndexTmpFileWriter.writeInt(-size);
    classificationIndexTmpFileWriter.writeInt(positions.size());
  }
  if (positions.size() > 0) {
    classificationIndexTmpFileWriter.writeLong(io.getPosition());
    for (    Long pos : positions) {
      io.writeLong(pos);
    }
  }
 else {
    classificationIndexTmpFileWriter.writeLong(-1);
  }
}

public void addToClassification ( Integer classId , int size , List < Long > positions ) throws IOException { numberOfClasses ++ ; classificationIndexTmpFileWriter . writeInt ( classId ) ; if ( size == positions . size ( ) ) classificationIndexTmpFileWriter . writeInt ( size ) ; else { classificationIndexTmpFileWriter . writeInt ( - size ) ; classificationIndexTmpFileWriter . writeInt ( positions . size ( ) ) ; } if ( positions . size ( ) > 0 ) { classificationIndexTmpFileWriter . writeLong ( io . getPosition ( ) ) ; for ( Long pos : positions ) { io . writeLong ( pos ) ; } } else { classificationIndexTmpFileWriter . writeLong ( - 1 ) ; } }
add an entry to the classification
