Package | Description |
---|---|
org.apache.commons.compress.archivers.jar |
Provides stream classes for reading and writing archives using
the ZIP format with some extensions for the special case of JAR
archives.
|
org.apache.commons.compress.archivers.zip |
Provides stream classes for reading and writing archives using
the ZIP format.
|
org.apache.commons.compress.changes |
EXPERIMENTAL support for changesets that are applied to
archives.
|
Modifier and Type | Class and Description |
---|---|
class |
JarArchiveEntry |
Constructor and Description |
---|
JarArchiveEntry(ZipArchiveEntry entry) |
Modifier and Type | Class and Description |
---|---|
private static class |
ZipFile.Entry
Extends ZipArchiveEntry to store the offset within the archive.
|
Modifier and Type | Field and Description |
---|---|
private ZipArchiveEntry |
ZipArchiveInputStream.CurrentEntry.entry
Current ZIP entry.
|
private ZipArchiveEntry |
UnsupportedZipFeatureException.entry |
private ZipArchiveEntry |
ZipArchiveOutputStream.CurrentEntry.entry
Current ZIP entry.
|
private ZipArchiveEntry |
ZipArchiveEntryRequest.zipArchiveEntry |
Modifier and Type | Field and Description |
---|---|
private java.util.List<ZipArchiveEntry> |
ZipFile.entries
List of entries in the order they appear inside the central
directory.
|
private java.util.List<ZipArchiveEntry> |
ZipArchiveOutputStream.entries
List of ZipArchiveEntries written so far.
|
private java.util.Map<ZipArchiveEntry,ZipArchiveOutputStream.EntryMetaData> |
ZipArchiveOutputStream.metaData
Holds some book-keeping data for each entry.
|
private java.util.Map<java.lang.String,java.util.LinkedList<ZipArchiveEntry>> |
ZipFile.nameMap
Maps String to list of ZipArchiveEntrys, name -> actual entries.
|
private java.util.Comparator<ZipArchiveEntry> |
ZipFile.offsetComparator
Compares two ZipArchiveEntries based on their offset within the archive.
|
Modifier and Type | Method and Description |
---|---|
ZipArchiveEntry |
UnsupportedZipFeatureException.getEntry()
The entry using the unsupported feature.
|
ZipArchiveEntry |
ZipFile.getEntry(java.lang.String name)
Returns a named entry - or
null if no entry by
that name exists. |
ZipArchiveEntry |
ZipArchiveInputStream.getNextZipEntry() |
(package private) ZipArchiveEntry |
ZipArchiveEntryRequest.getZipArchiveEntry()
Gets the underlying entry.
|
ZipArchiveEntry |
ScatterZipOutputStream.CompressedEntry.transferToArchiveEntry()
Update the original
ZipArchiveEntry with sizes/crc
Do not use this methods from threads that did not create the instance itself ! |
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration<ZipArchiveEntry> |
ZipFile.getEntries()
Returns all entries.
|
java.lang.Iterable<ZipArchiveEntry> |
ZipFile.getEntries(java.lang.String name)
Returns all named entries in the same order they appear within
the archive's central directory.
|
java.util.Enumeration<ZipArchiveEntry> |
ZipFile.getEntriesInPhysicalOrder()
Returns all entries in physical order.
|
java.lang.Iterable<ZipArchiveEntry> |
ZipFile.getEntriesInPhysicalOrder(java.lang.String name)
Returns all named entries in the same order their contents
appear within the archive.
|
private java.util.Map<ZipArchiveEntry,ZipFile.NameAndComment> |
ZipFile.populateFromCentralDirectory()
Reads the central directory of the given archive and populates
the internal tables with ZipArchiveEntry instances.
|
Modifier and Type | Method and Description |
---|---|
void |
ParallelScatterZipCreator.addArchiveEntry(ZipArchiveEntry zipArchiveEntry,
InputStreamSupplier source)
Adds an archive entry to this archive.
|
void |
ZipArchiveOutputStream.addRawArchiveEntry(ZipArchiveEntry entry,
java.io.InputStream rawStream)
Adds an archive entry with a raw input stream.
|
private void |
ZipArchiveOutputStream.addUnicodeExtraFields(ZipArchiveEntry ze,
boolean encodable,
java.nio.ByteBuffer name)
Adds UnicodeExtra fields for name and file comment if mode is
ALWAYS or the data cannot be encoded using the configured
encoding.
|
(package private) static boolean |
ZipUtil.canHandleEntryData(ZipArchiveEntry entry)
Whether this library is able to read or write the given entry.
|
boolean |
ZipFile.canReadEntryData(ZipArchiveEntry ze)
Whether this class is able to read the given entry.
|
(package private) static void |
ZipUtil.checkRequestedFeatures(ZipArchiveEntry ze)
Checks whether the entry requires features not (yet) supported
by the library and throws an exception if it does.
|
java.util.concurrent.Callable<java.lang.Object> |
ParallelScatterZipCreator.createCallable(ZipArchiveEntry zipArchiveEntry,
InputStreamSupplier source)
Create a callable that will compress the given archive entry.
|
private byte[] |
ZipArchiveOutputStream.createCentralFileHeader(ZipArchiveEntry ze) |
private byte[] |
ZipArchiveOutputStream.createCentralFileHeader(ZipArchiveEntry ze,
java.nio.ByteBuffer name,
ZipArchiveOutputStream.EntryMetaData entryMetaData,
boolean needsZip64Extra)
Writes the central file header entry.
|
private byte[] |
ZipArchiveOutputStream.createLocalFileHeader(ZipArchiveEntry ze,
java.nio.ByteBuffer name,
boolean encodable,
boolean phased,
long archiveOffset) |
static ZipArchiveEntryRequest |
ZipArchiveEntryRequest.createZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry,
InputStreamSupplier payloadSupplier)
Create a ZipArchiveEntryRequest
|
private Zip64Mode |
ZipArchiveOutputStream.getEffectiveZip64Mode(ZipArchiveEntry ze)
If the mode is AsNeeded and the entry is a compressed entry of
unknown size that gets written to a non-seekable stream then
change the default to Never.
|
private ZipEncoding |
ZipArchiveOutputStream.getEntryEncoding(ZipArchiveEntry ze) |
(package private) static java.lang.String |
Zip64RequiredException.getEntryTooBigMessage(ZipArchiveEntry ze)
Helper to format "entry too big" messages.
|
java.io.InputStream |
ZipFile.getInputStream(ZipArchiveEntry ze)
Returns an InputStream for reading the contents of the given entry.
|
private java.nio.ByteBuffer |
ZipArchiveOutputStream.getName(ZipArchiveEntry ze) |
java.io.InputStream |
ZipFile.getRawInputStream(ZipArchiveEntry ze)
Expose the raw stream of the archive entry (compressed form).
|
java.lang.String |
ZipFile.getUnixSymlink(ZipArchiveEntry entry)
Convenience method to return the entry's content as a String if isUnixSymlink()
returns true for it, otherwise returns null.
|
private Zip64ExtendedInformationExtraField |
ZipArchiveOutputStream.getZip64Extra(ZipArchiveEntry ze)
Get the existing ZIP64 extended information extra field or
create a new one and add it to the entry.
|
private void |
ZipArchiveOutputStream.handleZip64Extra(ZipArchiveEntry ze,
long lfhOffset,
boolean needsZip64Extra)
If the entry needs Zip64 extra information inside the central
directory then configure its data.
|
private boolean |
ZipArchiveOutputStream.hasZip64Extra(ZipArchiveEntry ze)
Is there a ZIP64 extended information extra field for the
entry?
|
private boolean |
ZipArchiveOutputStream.isTooLageForZip32(ZipArchiveEntry zipArchiveEntry) |
private boolean |
ZipArchiveOutputStream.isZip64Required(ZipArchiveEntry entry1,
Zip64Mode requestedMode) |
private void |
ZipArchiveOutputStream.setDefaults(ZipArchiveEntry entry)
Provides default values for compression method and last
modification time.
|
(package private) static void |
ZipUtil.setNameAndCommentFromExtraFields(ZipArchiveEntry ze,
byte[] originalNameBytes,
byte[] commentBytes)
If the entry has Unicode*ExtraFields and the CRCs of the
names/comments match those of the extra fields, transfer the
known Unicode values from the extra field.
|
private void |
ZipFile.setSizesAndOffsetFromZip64Extra(ZipArchiveEntry ze,
int diskStart)
If the entry holds a Zip64 extended information extra field,
read sizes from there if the entry's sizes are set to
0xFFFFFFFFF, do the same for the offset of the local file
header.
|
private boolean |
ZipArchiveOutputStream.shouldAddZip64Extra(ZipArchiveEntry entry,
Zip64Mode mode)
Whether to addd a Zip64 extended information extra field to the
local file header.
|
private boolean |
ZipArchiveInputStream.supportsCompressedSizeFor(ZipArchiveEntry entry)
Whether the compressed size for the entry is either known or
not required by the compression method being used.
|
private boolean |
ZipArchiveInputStream.supportsDataDescriptorFor(ZipArchiveEntry entry)
Whether this entry requires a data descriptor this library can work with.
|
private static boolean |
ZipUtil.supportsEncryptionOf(ZipArchiveEntry entry)
Whether this library supports the encryption used by the given
entry.
|
private static boolean |
ZipUtil.supportsMethodOf(ZipArchiveEntry entry)
Whether this library supports the compression method used by
the given entry.
|
boolean |
ZipArchiveEntryPredicate.test(ZipArchiveEntry zipArchiveEntry)
Indicate if the given entry should be included in the operation
|
protected void |
ZipArchiveOutputStream.writeCentralFileHeader(ZipArchiveEntry ze)
Writes the central file header entry.
|
protected void |
ZipArchiveOutputStream.writeDataDescriptor(ZipArchiveEntry ze)
Writes the data descriptor entry.
|
protected void |
ZipArchiveOutputStream.writeLocalFileHeader(ZipArchiveEntry ze)
Writes the local file header entry
|
private void |
ZipArchiveOutputStream.writeLocalFileHeader(ZipArchiveEntry ze,
boolean phased) |
Modifier and Type | Method and Description |
---|---|
private void |
ZipFile.readCentralDirectoryEntry(java.util.Map<ZipArchiveEntry,ZipFile.NameAndComment> noUTF8Flag)
Reads an individual entry of the central directory, creats an
ZipArchiveEntry from it and adds it to the global maps.
|
private void |
ZipFile.resolveLocalFileHeaderData(java.util.Map<ZipArchiveEntry,ZipFile.NameAndComment> entriesWithoutUTF8Flag)
Walks through all recorded entries and adds the data available
from the local file header.
|
Constructor and Description |
---|
CurrentEntry(ZipArchiveEntry entry) |
UnsupportedZipFeatureException(UnsupportedZipFeatureException.Feature reason,
ZipArchiveEntry entry)
Creates an exception.
|
UnsupportedZipFeatureException(ZipMethod method,
ZipArchiveEntry entry)
Creates an exception for archives that use an unsupported
compression algorithm.
|
ZipArchiveEntry(ZipArchiveEntry entry)
Creates a new zip entry with fields taken from the specified zip entry.
|
ZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry,
InputStreamSupplier payloadSupplier) |
Modifier and Type | Field and Description |
---|---|
private ZipArchiveEntry |
ChangeSetPerformer.ZipFileIterator.current |
Modifier and Type | Field and Description |
---|---|
private java.util.Enumeration<ZipArchiveEntry> |
ChangeSetPerformer.ZipFileIterator.nestedEnum |