在读取文件流时,不足一个读取单位是的处理
// 将压缩文件中的内容读取出来,并写进解压缩文件中
InputStream is = zf.getInputStream(entry);
FileOutputStream fos = new FileOutputStream(currentFile);
byte[] bs = new byte[1024];
int len;
while ((len=is.read(bs)) > 0) {
fos.write(bs, 0, len);
}
is.close();
fos.close();
- 未来可能遥远,但不轻易放弃
The future may be far away, but it is not easy to give up