@NotThreadSafe public final class TarOutputService extends Object implements net.java.truecommons.cio.OutputService<TarDriverEntry>
Because the TAR file format needs to know each entry's length in advance,
entries from an unknown source are actually written to temp files and copied
to the underlying TarArchiveOutputStream upon a call to their
OutputStream.close() method.
Note that this implies that the close() method may fail with
an IOException.
If the size of an entry is known in advance it's directly written to the
underlying TarArchiveOutputStream instead.
TarInputService| Constructor and Description |
|---|
TarOutputService(FsModel model,
net.java.truecommons.io.Sink sink,
TarDriver driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
TarDriverEntry |
entry(String name) |
Iterator<TarDriverEntry> |
iterator() |
net.java.truecommons.cio.OutputSocket<TarDriverEntry> |
output(TarDriverEntry local) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliterator@CreatesObligation public TarOutputService(FsModel model, net.java.truecommons.io.Sink sink, TarDriver driver) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface net.java.truecommons.shed.Stream<TarDriverEntry>IOException@CheckForNull public TarDriverEntry entry(String name)
entry in interface net.java.truecommons.cio.Container<TarDriverEntry>public Iterator<TarDriverEntry> iterator()
iterator in interface Iterable<TarDriverEntry>iterator in interface net.java.truecommons.cio.Container<TarDriverEntry>public net.java.truecommons.cio.OutputSocket<TarDriverEntry> output(TarDriverEntry local)
output in interface net.java.truecommons.cio.OutputService<TarDriverEntry>public int size()
size in interface net.java.truecommons.cio.Container<TarDriverEntry>Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.