@Override public void close() throws IOException {
synchronized (lock) {
    if (encoder != null) {
      drainEncoder();
      flushBytes(false);
      out.close();
      encoder=null;
      bytes=null;
    }
  }
}

@ Override public void close ( ) throws IOException { synchronized ( lock ) { if ( encoder != null ) { drainEncoder ( ) ; flushBytes ( false ) ; out . close ( ) ; encoder = null ; bytes = null ; } } }
closes this writer . this implementation flushes the buffer as well as the target stream . the target stream is then closed and the resources for the buffer and converter are released . < p > < p > only the first invocation of this method has any effect . subsequent calls do nothing .
