@Immutable public class TarDriver extends FsCharsetArchiveDriver<TarDriverEntry>
Subclasses must be thread-safe and should be immutable!
| Modifier and Type | Field and Description |
|---|---|
private IOPool<?> |
ioPool |
static Charset |
TAR_CHARSET
The character set for entry names and comments, which is the default
character set.
|
| Constructor and Description |
|---|
TarDriver(IOPoolProvider provider)
Constructs a new TAR driver.
|
assertEncodable, getCharset, toString, toZipOrTarEntryNamegetClosedIcon, getOpenIcon, getRedundantMetaDataSupport, isFederated, newController, newEntrygetPriorityprivate final IOPool<?> ioPool
public static final Charset TAR_CHARSET
public TarDriver(IOPoolProvider provider)
provider - the provider for the I/O buffer pool.public InputSocket<?> getInputSocket(FsController<?> controller, FsEntryName name, BitField<FsInputOption> options)
getInputSocket in class FsArchiveDriver<TarDriverEntry>public OutputSocket<?> getOutputSocket(FsController<?> controller, FsEntryName name, BitField<FsOutputOption> options, @CheckForNull Entry template)
getOutputSocket in class FsArchiveDriver<TarDriverEntry>protected final IOPool<?> getPool()
getPool in class FsArchiveDriver<TarDriverEntry>public boolean getRedundantContentSupport()
getRedundantContentSupport in class FsArchiveDriver<TarDriverEntry>TarDriver returns
true because when reading a TAR file sequentially,
each TAR entry should "override" any previously read
TAR entry with an equal name.public TarDriverEntry newEntry(String name)
public TarDriverEntry newEntry(String name, Entry.Type type, Entry template, BitField<FsOutputOption> mknod) throws CharConversionException
newEntry in class FsArchiveDriver<TarDriverEntry>CharConversionExceptionpublic TarDriverEntry newEntry(String name, TarArchiveEntry template)
public TarInputShop newInputShop(FsModel model, InputSocket<?> input) throws IOException
The implementation in the class TarDriver acquires an input
stream from the given socket and forwards the call to
newTarInputShop(de.schlichtherle.truezip.fs.FsModel, java.io.InputStream).
newInputShop in class FsArchiveDriver<TarDriverEntry>IOExceptionpublic OutputShop<TarDriverEntry> newOutputShop(FsModel model, OutputSocket<?> output, InputShop<TarDriverEntry> source) throws IOException
The implementation in the class TarDriver acquires an output
stream from the given socket, forwards the call to
newTarOutputShop(de.schlichtherle.truezip.fs.FsModel, java.io.OutputStream, de.schlichtherle.truezip.fs.archive.tar.TarInputShop) and wraps the result in a new
FsMultiplexedOutputShop.
newOutputShop in class FsArchiveDriver<TarDriverEntry>IOException@CreatesObligation protected TarInputShop newTarInputShop(FsModel model, @WillCloseWhenClosed InputStream in) throws IOException
IOException@CreatesObligation protected TarOutputShop newTarOutputShop(FsModel model, OutputStream out, @CheckForNull@WillNotClose TarInputShop source) throws IOException
IOExceptionCopyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.