public void truncate(final long size) throws FileNotFoundException, IOException {
  fileChannel.truncate(Math.max(size,writePosition));
}

public void truncate ( final long size ) throws FileNotFoundException , IOException { fileChannel . truncate ( Math . max ( size , writePosition ) ) ; }
truncates the overflow file to a given size if possible .
