Input Output Stream in Java
import java.io.*;class IOTest
{
public static void main(String[] arg) throws Exception
{
FileInputStream in=new FileInputStream("test.txt");
FileOutputStream out=new FileOutputStream("out.txt");
int c;
String ch;
do
{
c=in.read();
out.write(c);
}while(c!=-1);
while((c=test.read()) !=-1)
{
ch.appand((char)ch);
}
System.out.println(ch);
in.close();
out.close();
}
}
No comments:
Post a Comment