public static void method_copy()throws IOException{
FileInputStream is=new FileInputStream("img.jpg");
FileOutputStream fos=new FileOutputStream("zhpu.jpg");
BufferedInputStream buin=new BufferedInputStream(is);
BufferedOutputStream buos=new BufferedOutputStream(fos);
int len=0;
while((len=buin.read())!=-1){
buos.write(len);
}
buin.close();
buos.close();
}
java_字节缓冲区—bufferedinputstream,bufferedoutputstream
最新推荐文章于 2022-10-27 10:30:13 发布