public void close(){
  Preconditions.checkState(channel != null,"File not open.");
  try {
    if (channel.isOpen())     channel.close();
  }
 catch (  IOException e) {
    LOGGER.error("Failed to closed file channel for {}",path,e);
  }
 finally {
    channel=null;
  }
}

public void close ( ) { Preconditions . checkState ( channel != null , "File not open." ) ; try { if ( channel . isOpen ( ) ) channel . close ( ) ; } catch ( IOException e ) { LOGGER . error ( "Failed to closed file channel for {}" , path , e ) ; } finally { channel = null ; } }
closes the channel that ' s open to this file .
