@NotThreadSafe public class ZipOutputShop extends RawZipOutputStream<ZipDriverEntry> implements OutputShop<ZipDriverEntry>
MultiplexedOutputShop
to overcome this limitation.ZipInputShop
delegate
Constructor and Description |
---|
ZipOutputShop(ZipDriver driver,
FsModel model,
OutputStream out,
ZipInputShop source) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Retains the postamble of the source source ZIP file, if any.
|
protected ZipCryptoParameters |
getCryptoParameters()
Returns the parameters for encryption or authentication of entries.
|
ZipDriverEntry |
getEntry(String name)
Returns the entry for the given name or
null if no entry with
this name exists. |
FsModel |
getModel()
Returns the file system model provided to the constructor.
|
OutputSocket<ZipDriverEntry> |
getOutputSocket(ZipDriverEntry local)
Returns an output socket for writing to the given entry.
|
int |
getSize()
Returns the number of entries in this container.
|
boolean |
isBusy()
Returns whether this ZIP output shop is busy writing an archive entry
or not.
|
Iterator<ZipDriverEntry> |
iterator()
Returns an iteration of all entries written to this ZIP file so
far.
|
closeEntry, finish, getCharset, getComment, getLevel, getMethod, getRawCharset, length, putNextEntry, putNextEntry, setComment, setLevel, setMethod, size
flush, toString, write, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
@CreatesObligation public ZipOutputShop(ZipDriver driver, FsModel model, @WillCloseWhenClosed OutputStream out, @CheckForNull @WillNotClose ZipInputShop source) throws IOException
IOException
public void close() throws IOException
close
in interface OutputShop<ZipDriverEntry>
close
in interface Closeable
close
in interface AutoCloseable
close
in class RawZipOutputStream<ZipDriverEntry>
IOException
- On any I/O error.protected ZipCryptoParameters getCryptoParameters()
RawZipOutputStream
getCryptoParameters
in class RawZipOutputStream<ZipDriverEntry>
@CheckForNull public ZipDriverEntry getEntry(String name)
RawZipOutputStream
null
if no entry with
this name exists.
Note that the returned entry is shared with this instance.
It is illegal to change its state!getEntry
in interface EntryContainer<ZipDriverEntry>
getEntry
in class RawZipOutputStream<ZipDriverEntry>
name
- the name of the ZIP entry.name
or
null
if no entry with this name exists in this container.public FsModel getModel()
public OutputSocket<ZipDriverEntry> getOutputSocket(ZipDriverEntry local)
OutputService
getOutputSocket
in interface OutputService<ZipDriverEntry>
local
- the entry, which will be the
local target
of the returned
output socket.public int getSize()
EntryContainer
getSize
in interface EntryContainer<ZipDriverEntry>
public final boolean isBusy()
isBusy
in class RawZipOutputStream<ZipDriverEntry>
public Iterator<ZipDriverEntry> iterator()
RawZipOutputStream
iterator
in interface EntryContainer<ZipDriverEntry>
iterator
in interface OutputService<ZipDriverEntry>
iterator
in interface Iterable<ZipDriverEntry>
iterator
in class RawZipOutputStream<ZipDriverEntry>
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.