public class ZipSource
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COMPRESSION_NO_CHANGE |
| Constructor and Description |
|---|
ZipSource(java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,Entry> |
entries() |
java.util.List<? extends Source> |
getSelectedEntries() |
Source |
select(java.lang.String entryName,
java.lang.String newName) |
Source |
select(java.lang.String entryName,
java.lang.String newName,
int compressionLevel)
Select an entry to be copied to the archive managed by zipflinger.
|
static ZipSource |
selectAll(java.io.File file) |
public static final int COMPRESSION_NO_CHANGE
public ZipSource(@NonNull
java.io.File file)
throws java.io.IOException
java.io.IOException@NonNull public Source select(@NonNull java.lang.String entryName, @NonNull java.lang.String newName)
@NonNull public Source select(@NonNull java.lang.String entryName, @NonNull java.lang.String newName, int compressionLevel)
An entry will remain unchanged and zero-copy will happen when: - compression level is COMPRESSION_NO_CHANGE. - compression level is 1-9 and the entry is already compressed. - compression level is Deflater.NO_COMPRESSION and the entry is already uncompressed.
Otherwise, the entry is deflated/inflated accordingly via transfer to memory, crc calculation , and written to the target archive.
Name - of the entry in the source zip.Name - of the entry in the destination zip.The - desired compression level.public java.util.Map<java.lang.String,Entry> entries()
public static ZipSource selectAll(@NonNull java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic java.util.List<? extends Source> getSelectedEntries()