Top Description Fields Constructors Methods
org.apache.commons.compress.archivers.zip

public Class ZipArchiveEntryRequest

extends Object
Class Inheritance
Imports
java.io.InputStream, org.apache.commons.compress.parallel.InputStreamSupplier

A Thread-safe representation of a ZipArchiveEntry that is used to add entries to parallel archives.
Since
1.10

Field Summary

Modifier and TypeField and Description
private final int
private final InputStreamSupplier
private final ZipArchiveEntry
zipArchiveEntry

The ZIPArchiveEntry is not thread safe, and cannot be safely accessed by the getters of this class.

Constructor Summary

AccessConstructor and Description
private
ZipArchiveEntryRequest(final ZipArchiveEntry zipArchiveEntry, final InputStreamSupplier payloadSupplier)

Method Summary

Modifier and TypeMethod and Description
public static ZipArchiveEntryRequest

Returns:

The newly created request
createZipArchiveEntryRequest
(final ZipArchiveEntry
The entry to use
zipArchiveEntry
,
final InputStreamSupplier
The payload that will be added to the ZIP entry.
payloadSupplier
)

Creates a ZipArchiveEntryRequest

public int

Returns:

The compression method to use
getMethod
()

Gets the compression method to use

public InputStream

Returns:

The input stream.
getPayloadStream
()

Gets the payload that will be added to this ZIP entry

pack-priv ZipArchiveEntry

Returns:

the zipArchiveEntry that is basis for this request
getZipArchiveEntry
()

Gets the underlying entry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodback to summary
private final int method
payloadSupplierback to summary
private final InputStreamSupplier payloadSupplier
zipArchiveEntryback to summary
private final ZipArchiveEntry zipArchiveEntry

The ZIPArchiveEntry is not thread safe, and cannot be safely accessed by the getters of this class. It is safely accessible during the construction part of this class and also after the thread pools have been shut down.

Constructor Detail

ZipArchiveEntryRequestback to summary
private ZipArchiveEntryRequest(final ZipArchiveEntry zipArchiveEntry, final InputStreamSupplier payloadSupplier)

Method Detail

createZipArchiveEntryRequestback to summary
public static ZipArchiveEntryRequest createZipArchiveEntryRequest(final ZipArchiveEntry zipArchiveEntry, final InputStreamSupplier payloadSupplier)

Creates a ZipArchiveEntryRequest

Parameters
zipArchiveEntry:ZipArchiveEntry

The entry to use

payloadSupplier:InputStreamSupplier

The payload that will be added to the ZIP entry.

Returns:ZipArchiveEntryRequest

The newly created request

getMethodback to summary
public int getMethod()

Gets the compression method to use

Returns:int

The compression method to use

getPayloadStreamback to summary
public InputStream getPayloadStream()

Gets the payload that will be added to this ZIP entry

Returns:InputStream

The input stream.

getZipArchiveEntryback to summary
pack-priv ZipArchiveEntry getZipArchiveEntry()

Gets the underlying entry. Do not use this method from threads that did not create the instance itself !

Returns:ZipArchiveEntry

the zipArchiveEntry that is basis for this request