import Java.io.File;
import Java.io.FileInputStream;
import Java.io.FileNotFoundException;
import Java.io.FileOutputStream;
import Java.io.IOException;
public class TestIO {
/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
byte[] b = new byte[17*1024];
// ** txt
// File f = new File("d:\\test.txt");
// File outF = new File("d:\\testOut.txt");
// ** jpg
File f = new File("d:\\毫無保留.jpg");
File outF = new File("d:\\毫無保留Output.jpg");
try
{
FileInputStream fis = new FileInputStream(f);
FileOutputStream fops = new FileOutputStream(outF);
fis.read(b);
fops.write(b);
// ** for see
// String s = new String(b);
// System.out.println(s);
fis.close();
fops.close();
}
catch(FileNotFoundException fnfe)
{
System.out.println("FileNotFoundException fnfe");
fnfe.printStackTrace();
}
catch(IOException IE)
{
System.out.println("IOException IE");
IE.printStackTrace();
}
}
}