E - the type of the archive entries.@NotThreadSafe public class MultiplexedOutputShop<E extends MutableEntry> extends DecoratingOutputShop<E,OutputShop<E>>
OutputStream.close() method.
Note that this implies that the close() method may fail with
an IOException.delegate| Constructor and Description |
|---|
MultiplexedOutputShop(OutputShop<E> output,
IOPool<?> pool)
Constructs a new multiplexed output shop.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
E |
getEntry(String name)
Returns the entry for the given
name or
null if no entry with this name exists in this container. |
OutputSocket<? extends E> |
getOutputSocket(E 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 the container output archive is busy writing an archive
entry or not.
|
Iterator<E> |
iterator()
Returns a new iterator for all entries in this container.
|
toStringpublic MultiplexedOutputShop(@WillCloseWhenClosed OutputShop<E> output, IOPool<?> pool)
output - the decorated output shop.pool - the pool for buffering entry data.@DischargesObligation
public void close()
throws IOException
close in interface OutputShop<E extends MutableEntry>close in interface Closeableclose in interface AutoCloseableclose in class DecoratingOutputShop<E extends MutableEntry,OutputShop<E extends MutableEntry>>IOException@CheckForNull public E getEntry(String name)
EntryContainername or
null if no entry with this name exists in this container.getEntry in interface EntryContainer<E extends MutableEntry>getEntry in class DecoratingEntryContainer<E extends MutableEntry,OutputShop<E extends MutableEntry>>name - an entry name.name or
null if no entry with this name exists in this container.public OutputSocket<? extends E> getOutputSocket(E local)
OutputServicegetOutputSocket in interface OutputService<E extends MutableEntry>getOutputSocket in class DecoratingOutputShop<E extends MutableEntry,OutputShop<E extends MutableEntry>>local - the entry, which will be the
local target of the returned
output socket.public int getSize()
EntryContainergetSize in interface EntryContainer<E extends MutableEntry>getSize in class DecoratingEntryContainer<E extends MutableEntry,OutputShop<E extends MutableEntry>>public boolean isBusy()
public Iterator<E> iterator()
EntryContainerFirst, the iteration must be consistent: Multiple iterators must iterate the same entries in the same order again unless the set of entries has changed.
Next, the iteration should also reflect the natural order of the entries in this container. For example, if this container represents an archive file, the iteration should reflect the natural order of the entries in the archive file.
iterator in interface EntryContainer<E extends MutableEntry>iterator in interface OutputService<E extends MutableEntry>iterator in interface Iterable<E extends MutableEntry>iterator in class DecoratingEntryContainer<E extends MutableEntry,OutputShop<E extends MutableEntry>>Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.