public class ZipWriter
extends java.lang.Object
DeferredFileOutputStream
s which store data in
memory or, if a certain threshold size is exceeded in
temporary files.
Calling close()
will write all data into the
given defined zip file.
Each entry offers its own OutputStream
to write
into in parallel.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_THRESHOLD |
Constructor and Description |
---|
ZipWriter(java.io.File targetFile)
ZipWriter with default values. |
ZipWriter(java.io.File targetFile,
java.lang.Integer threshold,
java.io.File tmpFolder) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.OutputStream |
getEntryStream(java.lang.String entryName) |
public static final int DEFAULT_THRESHOLD
public ZipWriter(java.io.File targetFile)
ZipWriter
with default values.targetFile
- final zip file to be filledpublic ZipWriter(java.io.File targetFile, java.lang.Integer threshold, java.io.File tmpFolder)
targetFile
- final zip file to be filledthreshold
- the threshold when to start writing to file,
uses default (2MB) if null
tmpFolder
- the folder to write the temporary file toCopyright © 2007-2020 EDIT. All Rights Reserved.