The internal data format of the entries used by this class are entirely private to this class and are not part of any public api whatsoever.
It is possible to extend this class to support different kinds of backing storage, the default implementation only supports file-based backing.
Thread safety: This class supports multiple threads. But the "writeTo" method must be called by the thread that originally created the
ZipArchiveEntry.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ScatterGatherBackingStore | |
| private final AtomicBoolean | |
| private final Queue | |
| private final StreamCompressor | |
| private ScatterZipOutputStream. |
| Access | Constructor and Description |
|---|---|
| public | ScatterZipOutputStream(final ScatterGatherBackingStore backingStore, final StreamCompressor streamCompressor)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addArchiveEntry(final ZipArchiveEntryRequest
The entry to write. zipArchiveEntryRequest)Adds an archive entry to this scatter stream. |
| public void | close()
Implements java. |
| public static ScatterZipOutputStream | Returns: A ScatterZipOutputStream that is ready for use.The file to offload compressed data into. file)Creates a |
| public static ScatterZipOutputStream | Returns: A ScatterZipOutputStream that is ready for use.The file to offload compressed data into. file, final int The compression level to use, @see #Deflater compressionLevel)Creates a |
| public static ScatterZipOutputStream | Returns: A ScatterZipOutputStream that is ready for use.The path to offload compressed data into. path)Creates a |
| public static ScatterZipOutputStream | Returns: A ScatterZipOutputStream that is ready for use.The path to offload compressed data into. path, final int The compression level to use, @see #Deflater compressionLevel)Creates a |
| public void | writeTo(final ZipArchiveOutputStream
The archive to receive the contents of this target)ScatterZipOutputStream.Writes the contents of this scatter stream to a target archive. |
| public ScatterZipOutputStream. | Returns: the ZipEntryWriter created on first call of the methodGets a ZIP entry writer for this scatter stream. |
| backingStore | back to summary |
|---|---|
| private final ScatterGatherBackingStore backingStore | |
| isClosed | back to summary |
|---|---|
| private final AtomicBoolean isClosed | |
| items | back to summary |
|---|---|
| private final Queue<ScatterZipOutputStream. | |
| streamCompressor | back to summary |
|---|---|
| private final StreamCompressor streamCompressor | |
| zipEntryWriter | back to summary |
|---|---|
| private ScatterZipOutputStream. | |
| ScatterZipOutputStream | back to summary |
|---|---|
| public ScatterZipOutputStream(final ScatterGatherBackingStore backingStore, final StreamCompressor streamCompressor) | |
| addArchiveEntry | back to summary |
|---|---|
| public void addArchiveEntry(final ZipArchiveEntryRequest zipArchiveEntryRequest) throws IOException Adds an archive entry to this scatter stream.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Closes this stream, freeing all resources involved in the creation of this stream.
| |
| fileBased | back to summary |
|---|---|
| public static ScatterZipOutputStream fileBased(final File file) throws FileNotFoundException Creates a
| |
| fileBased | back to summary |
|---|---|
| public static ScatterZipOutputStream fileBased(final File file, final int compressionLevel) throws FileNotFoundException Creates a
| |
| pathBased | back to summary |
|---|---|
| public static ScatterZipOutputStream pathBased(final Path path) throws FileNotFoundException Creates a
| |
| pathBased | back to summary |
|---|---|
| public static ScatterZipOutputStream pathBased(final Path path, final int compressionLevel) throws FileNotFoundException Creates a
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(final ZipArchiveOutputStream target) throws IOException Writes the contents of this scatter stream to a target archive.
| |
| zipEntryWriter | back to summary |
|---|---|
| public ScatterZipOutputStream. Gets a ZIP entry writer for this scatter stream.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | |
| pack-priv final long | |
| pack-priv final long | |
| pack-priv final ZipArchiveEntryRequest |
| Access | Constructor and Description |
|---|---|
| pack-priv | CompressedEntry(final ZipArchiveEntryRequest zipArchiveEntryRequest, final long crc, final long compressedSize, final long size)
|
| Modifier and Type | Method and Description |
|---|---|
| public ZipArchiveEntry | Returns: the zipArchiveEntry that is the basis for this request.Updates the original |
| compressedSize | back to summary |
|---|---|
| pack-priv final long compressedSize | |
| crc | back to summary |
|---|---|
| pack-priv final long crc | |
| size | back to summary |
|---|---|
| pack-priv final long size | |
| zipArchiveEntryRequest | back to summary |
|---|---|
| pack-priv final ZipArchiveEntryRequest zipArchiveEntryRequest | |
| CompressedEntry | back to summary |
|---|---|
| pack-priv CompressedEntry(final ZipArchiveEntryRequest zipArchiveEntryRequest, final long crc, final long compressedSize, final long size) | |
| transferToArchiveEntry | back to summary |
|---|---|
| public ZipArchiveEntry transferToArchiveEntry() Updates the original
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Iterator | |
| private final InputStream |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. |
| public void |
| itemsIterator | back to summary |
|---|---|
| private final Iterator<ScatterZipOutputStream. | |
| itemsIteratorData | back to summary |
|---|---|
| private final InputStream itemsIteratorData | |
| ZipEntryWriter | back to summary |
|---|---|
| public ZipEntryWriter(final ScatterZipOutputStream scatter) throws IOException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| writeNextZipEntry | back to summary |
|---|---|
| public void writeNextZipEntry(final ZipArchiveOutputStream target) throws IOException | |