Code example for FileOutputStream

0
  public ProfileOutput(PrintStream out) {
    this.stream = out;
  } 
 
  public ProfileOutput(File out) throws FileNotFoundException {
    this.stream = new PrintStream(new FileOutputStream(out));
  } 
 
  public void printProfile(ProfilePrinter printer) {
    if (headerPrinted) {
      printer.printProfile(stream, false);
    } else { 
      printer.printHeader(stream);
      printer.printProfile(stream, true);
      headerPrinted = true;
      footerAndCleanupOnShutdown(printer);
    } 
  } 
 
  private void footerAndCleanupOnShutdown(final ProfilePrinter printer) {
Connect your IDE to all the code out there  Get Codota for Java