Code example for PrintStream

Methods: flush

0
    System.out.println();
    PrintStream out = null;
 
    try 
    { 
      out = new PrintStream(new File(PromoterConfig.INSTANCE.getCompositionTempArea(), "index.html"));
      webNode.generate(out, 0);
      out.flush();
    } 
    catch (Exception ex)
    { 
      throw new RuntimeException(ex);
    } 
    finally 
    { 
      IO.close(out);
    } 
  } 
}