public void add(R record){
  records.add(record);
  lastRecord=record;
  currentSizeBytes+=record.lengthWithOverhead();
  if (timestamp < 0) {
    timestamp=System.currentTimeMillis();
  }
}

public void add ( R record ) { records . add ( record ) ; lastRecord = record ; currentSizeBytes += record . lengthWithOverhead ( ) ; if ( timestamp < 0 ) { timestamp = System . currentTimeMillis ( ) ; } }
adds a record to the buffer .
