ZipArchiveOutputStream zos = new ZipArchiveOutputStream(fos)) {
ZipArchiveEntry ze;
- while ((ze = zis.getNextZipEntry()) != null) {
+ while ((ze = zis.getNextEntry()) != null) {
// the cipher output stream pads the data, therefore we can't reuse the ZipEntry with set sizes
// as those will be validated upon close()
ZipArchiveEntry zeNew = new ZipArchiveEntry(ze.getName());
try (ZipArchiveInputStream zin = new ZipArchiveInputStream(d.getDataStream(root))) {
while (true) {
- ZipArchiveEntry entry = zin.getNextZipEntry();
+ ZipArchiveEntry entry = zin.getNextEntry();
if (entry == null) {
break;
}
ZipArchiveInputStream zin = new ZipArchiveInputStream(new ByteArrayInputStream(buf));
while (true) {
- ZipArchiveEntry entry = zin.getNextZipEntry();
+ ZipArchiveEntry entry = zin.getNextEntry();
if (entry==null) {
break;
}
try (final ZipArchiveInputStream zis = new ZipArchiveInputStream(d.getDataStream(fs))) {
int[] sizes = { 3711, 1155, 445, 9376, 450, 588, 1337, 2593, 304, 7910 };
for (int size : sizes) {
- final ZipArchiveEntry ze = zis.getNextZipEntry();
+ final ZipArchiveEntry ze = zis.getNextEntry();
assertNotNull(ze);
IOUtils.copy(zis, bos);
assertEquals(size, bos.size());
int count = 0;
try (ZipArchiveInputStream zis = new ZipArchiveInputStream(Files.newInputStream(tempFile.toPath()))) {
ZipArchiveEntry entry;
- while ((entry = zis.getNextZipEntry()) != null) {
+ while ((entry = zis.getNextEntry()) != null) {
// Since POI 5.2.5, you can stop XSSFWorkbook closing the InputStream by using this new constructor
XSSFWorkbook wb = new XSSFWorkbook(zis, false);
assertNotNull(wb);
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
+import org.apache.commons.io.input.BoundedInputStream;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.poifs.crypt.ChainingMode;
import org.apache.poi.poifs.crypt.CryptoFunctions;
import org.apache.poi.poifs.crypt.HashAlgorithm;
import org.apache.poi.poifs.filesystem.DirectoryNode;
import org.apache.poi.poifs.filesystem.DocumentInputStream;
-import org.apache.commons.io.input.BoundedInputStream;
import org.apache.poi.util.LittleEndian;
/**