Do not rely on ZipArchiveInputStream#available()
@@ -73,9 +73,6 @@ class ZipHelper {
} else {
ZipArchiveInputStream inputStream =
new ZipArchiveInputStream(new ByteArrayInputStream(mZipBuffer));
- if (inputStream.available() == 0) {
- throw new IllegalArgumentException("Could not unzip the given ODF package!");
- } else {
ZipArchiveEntry zipEntry = inputStream.getNextZipEntry();
if (zipEntry != null) {
firstEntryName = zipEntry.getName();
@@ -102,7 +99,6 @@ class ZipHelper {
}
}
}
- }
inputStream.close();
}
return firstEntryName;
