@Override
    public void close() throws IOException {
        if (out instanceof Closeable) {
            closed = true;
            ((Closeable) out).close();
        }
    }
@ Override public void close ( ) throws IOException { if ( out instanceof Closeable ) { closed = true ; ( ( Closeable ) out ) . close ( ) ; } }
Closes this formatter.  If the destination implements the {@link
java.io.Closeable} interface, its {@code close} method will be invoked.

<p> Closing a formatter allows it to release resources it may be holding
(such as open files).  If the formatter is already closed, then invoking
this method has no effect.

<p> Attempting to invoke any methods except {@link #ioException()} in
this formatter after it has been closed will result in a {@link
FormatterClosedException}.