/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author ICI Makati */ //The FileIOApp Program //Illustrates the use if the FileInputStream, FileOuptStream, and File classes. //It writes a string to an output file and then reads the file to verify that the //output was wirtten correctly.The file used for the I/O is then deleted. import java.lang.System; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.File; import java.io.IOException; public class FileIOApp { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ //Create FileOutputStream FileOutputStream outStream = new FileOutputStream("test.txt"); String s = "This is a test."; //Write current position value "s" into outStream (FileOutputStream) for (int i=0;i