标题: IO复制代码 [打印本页] 作者: libin159028 时间: 2015-6-16 00:38 标题: IO复制代码 public class Demo {
public static void main(String[] args) throws IOException {
FileInputStream in = new FileInputStream("D:\\aaa\\cxy.bmp");
FileOutputStream out = new FileOutputStream("cxy.bmp");
int n = 0;
while((n = in.read()) != -1){
out.write(n);
}
//释放资源
in.close();
out.close();