import java.util.Map;
import java.util.NoSuchElementException;
+import org.apache.commons.compress.archivers.zip.Zip64Mode;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.SheetVisibility;
import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.Internal;
-import org.apache.poi.util.NotImplemented;
-import org.apache.poi.util.POILogFactory;
-import org.apache.poi.util.POILogger;
-import org.apache.poi.util.Removal;
-import org.apache.poi.util.TempFile;
+import org.apache.poi.util.*;
import org.apache.poi.xssf.model.SharedStringsTable;
import org.apache.poi.xssf.usermodel.XSSFChartSheet;
import org.apache.poi.xssf.usermodel.XSSFSheet;
*/
private final SharedStringsTable _sharedStringSource;
+ private Zip64Mode zip64Mode = Zip64Mode.AsNeeded;
+
/**
* Construct a new workbook with default row window size
*/
}
}
}
+
/**
* Construct an empty workbook and specify the window for row access.
* <p>
_randomAccessWindowSize = rowAccessWindowSize;
}
+ /**
+ * @param zip64Mode {@link Zip64Mode}
+ *
+ * @since 4.0.3
+ */
+ @Beta
+ public void setZip64Mode(Zip64Mode zip64Mode) {
+ this.zip64Mode = zip64Mode;
+ }
+
/**
* Get whether temp files should be compressed.
*
public boolean isCompressTempFiles() {
return _compressTmpFiles;
}
+
/**
* Set whether temp files should be compressed.
* <p>
protected void injectData(ZipEntrySource zipEntrySource, OutputStream out) throws IOException {
ZipArchiveOutputStream zos = new ZipArchiveOutputStream(out);
+ zos.setUseZip64(zip64Mode);
try {
Enumeration<? extends ZipArchiveEntry> en = zipEntrySource.getEntries();
while (en.hasMoreElements()) {