int len;
while((len=read.read(c))!=-1){
bw.write(c, 0, len);
bw.flush();
if(fos!=null){
bw.close();
}
if(fis!=null){
br.close();
}
}
}
Exception in thread "main" java.io.IOException: Stream closed
at sun.nio.cs.StreamDecoder.ensureOpen(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.Reader.read(Unknown Source)
at at.xupt.liu.FileCopy.methodCopy(TestFileCopy.java:35)
at at.xupt.liu.TestFileCopy.main(TestFileCopy.java:17)