import java.io.*; public class TestFileInputStream { public static void main(String[] args) throws Exception {
FileInputStream f= new FileInputStream("TestFileInputStream.java"); byte[] bbuf= new byte[1024]; int hasRead=0; while((hasRead=f.read(bbuf))>0){ System.out.println(new String(bbuf,0,hasRead)); }
} }
import java.io.*; import java.lang.*; public class TestFileWriter { public static void main(String[] args) throws Exception {