package com.lee;
import java.io.FileOutputStream;
import java.io.FileInputStream;
public class Exam2 {
public static void main(String[] args){
//InputStream is = System.in;
int data=0;
FileOutputStream fos =null;//통로.관.파이프
try{
FileInputStream is = new FileInputStream("c:\\windows\\부채.bmp");
fos=new FileOutputStream("c:\\test.bmp");
/*String content = "Hello FileOutputStream";
byte[] cont =content.getBytes();//형변환
*/
while((data = is.read()) != -1){
fos.write(data);//데이터 보내라
}
}catch(Exception e){
}
}
}