import java.io.*;public class FileOutputStreamTest { public static void main(String[] args) {
FileInputStream fis = null;
FileOutputStream fos = null;
try {
fis = new FileInputStream("d:\\A.java");
fos = new FileOutputStream("d:\\s.txt");
byte [] b = new byte[32];
int len = fis.read(b);
while(len > 0){
fos.write(b, 0, len);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{

}
}
}