public void myClose() throws IOException
{
is.close();
}
}
public class Test
{
public static void main(String[] args) throws IOException
{
FileInputStream fis = new FileInputStream("F:\\11.jpg");
FileOutputStream fos = new FileOutputStream("E:\\22.jpg");
MyBufferedInputStream mbis = new MyBufferedInputStream(fis);
int c = 0;
while ((c = mbis.myRead())!=-1) //判断流中是否还有数据
{
fos.write(c);
}
fos.close();
mbis.myClose();
}
} 作者: 张振纲 时间: 2012-8-10 23:47
杨文宇 发表于 2012-8-10 23:19
import java.io.*;
class MyBufferedInputStream
{