KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > console > examples > Main


1 package org.sapia.console.examples;
2
3 import java.io.File JavaDoc;
4 import java.io.PrintStream JavaDoc;
5
6
7 /**
8  * @author Yanick Duchesne
9  *
10  * <dl>
11  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2004 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
12  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
13  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public class Main {
17   public static void main(String JavaDoc[] args) {
18     try {
19       java.io.FileOutputStream JavaDoc fos = new java.io.FileOutputStream JavaDoc(new File JavaDoc(
20             "bin/output.txt"), true);
21       PrintStream JavaDoc ps = new PrintStream JavaDoc(fos, true);
22       ps.println("THIS IS PROGRAM OUTPUT");
23       ps.flush();
24       ps.close();
25     } catch (Exception JavaDoc e) {
26       e.printStackTrace();
27     }
28   }
29 }
30
Popular Tags