//This sample program copies an existing file "story" into //another file "copy_of_story". Please make sure the file //"story" is there is the directory where you execute //this program import java.io.*; class IO_without_buffer { public static void main(String args[]) throws IOException, FileNotFoundException { FileReader myReader = new FileReader("story"); FileWriter myWriter = new FileWriter("copy_of_story"); char ch; int n; n = myReader.read(); while(n!=-1) { ch = (char)n; myWriter.write(ch); n = myReader.read(); } myReader.close(); myWriter.close(); } }