code: public void flush() {
          ensureOpen();
          if (a instanceof Flushable) {
              try {
                  ((Flushable)a).flush();
              } catch (IOException ioe) {
                  lastException = ioe;
              }
          }
      }
docs: Flushes this formatter.  If the destination implements the {@link
  java.io.Flushable} interface, its {@code flush} method will be invoked.
  
  <p> Flushing a formatter writes any buffered output in the destination
  to the underlying stream.
  
  @throws  FormatterClosedException
  If this formatter has been closed by invoking its {@link
  #close()} method