/*
    Program TestPrintStream

    A test program to save data to a file using PrintWriter for
    high level i/o.
*/

import java.io.*;

class TestFileWriter
{
   public static void main (String[] args) throws IOException
   {
      //setup file and stream
      FileWriter       writer     = new FileWriter( "outfile.dat" );

      //write values of primitive data types to the stream
      writer.write( " " + 25 + "\n" );
      writer.write( " " + 35 + "\n" );
      writer.write( " " + 45 + "\n" );

      //output done, so close the stream
      writer.close();
   }
}
