Class ZipArchiveEntryRequest
- java.lang.Object
-
- org.apache.commons.compress.archivers.zip.ZipArchiveEntryRequest
-
public class ZipArchiveEntryRequest extends java.lang.Object
A Thread-safe representation of a ZipArchiveEntry that is used to add entries to parallel archives.- Since:
- 1.10
-
-
Field Summary
Fields Modifier and Type Field Description private int
method
private InputStreamSupplier
payloadSupplier
private ZipArchiveEntry
zipArchiveEntry
-
Constructor Summary
Constructors Modifier Constructor Description private
ZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier payloadSupplier)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZipArchiveEntryRequest
createZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier payloadSupplier)
Create a ZipArchiveEntryRequestint
getMethod()
The compression method to usejava.io.InputStream
getPayloadStream()
The paylaod that will be added to this zip entry(package private) ZipArchiveEntry
getZipArchiveEntry()
Gets the underlying entry.
-
-
-
Field Detail
-
zipArchiveEntry
private final ZipArchiveEntry zipArchiveEntry
-
payloadSupplier
private final InputStreamSupplier payloadSupplier
-
method
private final int method
-
-
Constructor Detail
-
ZipArchiveEntryRequest
private ZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier payloadSupplier)
-
-
Method Detail
-
createZipArchiveEntryRequest
public static ZipArchiveEntryRequest createZipArchiveEntryRequest(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier payloadSupplier)
Create a ZipArchiveEntryRequest- Parameters:
zipArchiveEntry
- The entry to usepayloadSupplier
- The payload that will be added to the zip entry.- Returns:
- The newly created request
-
getPayloadStream
public java.io.InputStream getPayloadStream()
The paylaod that will be added to this zip entry- Returns:
- The input stream.
-
getMethod
public int getMethod()
The compression method to use- Returns:
- The compression method to use
-
getZipArchiveEntry
ZipArchiveEntry getZipArchiveEntry()
Gets the underlying entry. Do not use this methods from threads that did not create the instance itself !- Returns:
- the zipeArchiveEntry that is basis for this request
-
-