import java.io.*;
public class test {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
InputStream f = new FileInputStream("11");
OutputStream f0 = new FileOutputStream("22");
System.out.println("Total Available Bytes:"+f.available());
byte b[] =new byte[100];
int code;
while(true){
code = f.read(b);
if(code<=0)break;
f0.write(b);
}
f.close();
f0.close();
}
}
|