将zipInputSteam的数据读取到byte数组里面的时候报错
java.util.zip.ZipException: invalid entry size (expected 61268 but got 61695 bytes)
private static byte[] getData(InflaterInputStream zis) {
try {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
byte[] temp = new byte[3072];
byte[] buf = null;
int length = 0;
System.out.println(zis.available());
while ((length = zis.read(temp, 0, 3072)) != -1) {
bout.write(temp, 0, length);
}
buf = bout.toByteArray();
bout.close();
return buf;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
zis是zipInputStream的对象。这个是什么原因造成的,有什么解决办法??