1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
public static void main(String[] args) throws IOException { // TODO Auto-generated method stub //Byte Streams FileInputStream in=null; FileOutputStream out = null; in = new FileInputStream("C:\\temp.txt"); out = new FileOutputStream("C:\\temp1.txt"); int c; while ( (c=in.read()) != -1 ){ out.write(c); } in.close(); out.close(); } |