@NotThreadSafe public final class TarOutputService extends java.lang.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(net.java.truevfs.kernel.spec.FsModel model,
net.java.truecommons.io.Sink sink,
TarDriver driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
TarDriverEntry |
entry(java.lang.String name) |
java.util.Iterator<TarDriverEntry> |
iterator() |
net.java.truecommons.cio.OutputSocket<TarDriverEntry> |
output(TarDriverEntry local) |
int |
size() |
@CreatesObligation
public TarOutputService(net.java.truevfs.kernel.spec.FsModel model,
net.java.truecommons.io.Sink sink,
TarDriver driver)
throws java.io.IOException
java.io.IOExceptionpublic int size()
size in interface net.java.truecommons.cio.Container<TarDriverEntry>public java.util.Iterator<TarDriverEntry> iterator()
iterator in interface java.lang.Iterable<TarDriverEntry>iterator in interface net.java.truecommons.cio.Container<TarDriverEntry>@CheckForNull public TarDriverEntry entry(java.lang.String name)
entry 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 void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface net.java.truecommons.shed.Stream<TarDriverEntry>java.io.IOException