Code example for PrintStream

Methods: close

0
  } 
 
  private void footerAndCleanupOnShutdown(final ProfilePrinter printer) {
    Runtime.getRuntime().addShutdownHook(new Thread() {
      public void run() { 
        printer.printFooter(stream);
        stream.close();
      } 
    }); 
  } 
}