private void closeFileSilently(){
  try {
    file.close();
  }
 catch (  IOException e) {
  }
}

private void closeFileSilently ( ) { try { file . close ( ) ; } catch ( IOException e ) { } }
just close the file , without setting the reference to null . this method is called when writing failed . the reference is not set to null so that there are no nullpointerexceptions later on .
