@ Override public void close ( ) throws IOException { if ( ! isClosed ) { flush ( ) ; if ( closeChannel ) { channel . close ( ) ; } isClosed = true ; } }
Closes channel . Underlying channel is closed only if it was opened by one of the constructors .