package fileInOut;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class DatainputStreamDataoutputtreeam {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
FileInputStream fi = new FileInputStream("D://aaa.class");
DataInputStream dis = new DataInputStream(fi);
FileOutputStream fo = new FileOutputStream("D://c.calss");
DataOutputStream dos = new DataOutputStream(fo);
int temp;
while ((temp=dis.read())!=-1) {
dos.write(temp);
}
fi.close();
dos.close();
}
}
03-31
7243
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)