E
- The type of the created ZIP entries.public interface ZipFileParameters<E extends ZipEntry> extends ZipCharsetParameters, ZipEntryFactory<E>
Warning: This interface is not intended for public use - its API may change at will without prior notification!
Modifier and Type | Method and Description |
---|---|
boolean |
getPostambled()
Returns the flag for supporting postambles of arbitrary length.
|
boolean |
getPreambled()
Returns the flag for supporting preambles.
|
getCharset
newEntry
boolean getPostambled()
true
, then a ZIP file is allowed to
contain arbitrary data of arbitrary length as its postamble after the
actual ZIP file data.
Note that searching for an arbitrary length postamble can seriously
degrade the performance when reading a false positive ZIP file, i.e.
an arbitrary file which is not compatible to the ZIP File Format
Specification, because then the entire file needs to get searched for
an End Of Central Directory Record (EOCDR) signature.
A valid use case are self extracting ZIP files with very large
postambles to host the extraction code.
If this method returns false
, then a ZIP file may still have a
postamble, but it must not exceed 64KB size, including the End Of
Central Directory record with the ZIP file comment.
This causes the reading of a false positive ZIP file to fail fast.
boolean getPreambled()
true
, then a ZIP file is allowed to
contain arbitrary data as its preamble before the actual ZIP file data.
Self Extracting Archives typically use a preamble to store the
application code that is required to extract the ZIP file contents.
If this method returns false
, then a ZIP file must start with
either a Local File Header (LFH) signature,
a ZIP64 End Of Central Directory Record (EOCDR) signature or an End Of
Central Directory Record (EOCDR) signature.
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.