@Immutable public class TarDriver extends net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>
Subclasses must be thread-safe and should be immutable!
| Modifier and Type | Field and Description |
|---|---|
static java.nio.charset.Charset |
TAR_CHARSET
The character set for entry names and comments, which is the default
character set.
|
| Constructor and Description |
|---|
TarDriver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAddPaxHeaderForNonAsciiNames()
Returns
true if writing PAX headers for non US-ASCII entry names
should be supported or not. |
int |
getBigNumberMode()
Returns the method to use for writing entries of more than
TarConstants.MAXSIZE (8 GiB) size. |
java.nio.charset.Charset |
getCharset() |
int |
getLongFileMode()
Returns the method to use for encoding entry names with
TarConstants.NAMELEN or more characters. |
net.java.truecommons.cio.IoBufferPool |
getPool() |
boolean |
getRedundantContentSupport() |
TarDriverEntry |
newEntry(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options,
java.lang.String name,
net.java.truecommons.cio.Entry.Type type,
net.java.truecommons.cio.Entry template) |
TarDriverEntry |
newEntry(java.lang.String name) |
TarDriverEntry |
newEntry(java.lang.String name,
org.apache.commons.compress.archivers.tar.TarArchiveEntry template) |
protected net.java.truecommons.cio.InputService<TarDriverEntry> |
newInput(net.java.truevfs.kernel.spec.FsModel model,
net.java.truevfs.kernel.spec.FsInputSocketSource source) |
protected net.java.truecommons.cio.OutputService<TarDriverEntry> |
newOutput(net.java.truevfs.kernel.spec.FsModel model,
net.java.truevfs.kernel.spec.FsOutputSocketSink sink,
net.java.truecommons.cio.InputService<TarDriverEntry> input) |
protected net.java.truevfs.kernel.spec.FsOutputSocketSink |
sink(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options,
net.java.truevfs.kernel.spec.FsController controller,
net.java.truevfs.kernel.spec.FsNodeName name)
Sets
FsAccessOption.COMPRESS in options before
forwarding the call to controller. |
protected net.java.truevfs.kernel.spec.FsInputSocketSource |
source(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options,
net.java.truevfs.kernel.spec.FsController controller,
net.java.truevfs.kernel.spec.FsNodeName name)
Clears
FsAccessOption.CACHE in options before
forwarding the call to controller. |
public static final java.nio.charset.Charset TAR_CHARSET
public java.nio.charset.Charset getCharset()
getCharset in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>TAR_CHARSET.public boolean getAddPaxHeaderForNonAsciiNames()
true if writing PAX headers for non US-ASCII entry names
should be supported or not.
As of TrueVFS 0.10.7, the implementation in TarDriver returns
true.
In older versions, the behaviour was as if this method returned
false.public int getLongFileMode()
TarConstants.NAMELEN or more characters.
As of TrueVFS 0.10.7, the implementation in TarDriver returns
TarArchiveOutputStream.LONGFILE_POSIX.
In older versions, the implementation returned
TarArchiveOutputStream.LONGFILE_GNU.public int getBigNumberMode()
TarConstants.MAXSIZE (8 GiB) size.
As of TrueVFS 0.10.7, the implementation in TarDriver returns
TarArchiveOutputStream.BIGNUMBER_POSIX.
In older versions, the behaviour was as if this method returned
TarArchiveOutputStream.BIGNUMBER_ERROR.public net.java.truecommons.cio.IoBufferPool getPool()
The implementation in the class TarDriver calls
IoBufferPoolLocator.SINGLETON.get().
getPool in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>public boolean getRedundantContentSupport()
getRedundantContentSupport in class net.java.truevfs.kernel.spec.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.protected net.java.truecommons.cio.InputService<TarDriverEntry> newInput(net.java.truevfs.kernel.spec.FsModel model, net.java.truevfs.kernel.spec.FsInputSocketSource source) throws java.io.IOException
newInput in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>java.io.IOExceptionprotected net.java.truecommons.cio.OutputService<TarDriverEntry> newOutput(net.java.truevfs.kernel.spec.FsModel model, net.java.truevfs.kernel.spec.FsOutputSocketSink sink, @CheckForNull @WillNotClose net.java.truecommons.cio.InputService<TarDriverEntry> input) throws java.io.IOException
newOutput in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>java.io.IOExceptionprotected net.java.truevfs.kernel.spec.FsInputSocketSource source(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options,
net.java.truevfs.kernel.spec.FsController controller,
net.java.truevfs.kernel.spec.FsNodeName name)
FsAccessOption.CACHE in options before
forwarding the call to controller.source in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>protected net.java.truevfs.kernel.spec.FsOutputSocketSink sink(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options,
net.java.truevfs.kernel.spec.FsController controller,
net.java.truevfs.kernel.spec.FsNodeName name)
FsAccessOption.COMPRESS in options before
forwarding the call to controller.sink in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>public TarDriverEntry newEntry(net.java.truecommons.shed.BitField<net.java.truevfs.kernel.spec.FsAccessOption> options, java.lang.String name, net.java.truecommons.cio.Entry.Type type, @CheckForNull net.java.truecommons.cio.Entry template)
newEntry in class net.java.truevfs.kernel.spec.FsArchiveDriver<TarDriverEntry>public TarDriverEntry newEntry(java.lang.String name)
public TarDriverEntry newEntry(java.lang.String name, org.apache.commons.compress.archivers.tar.TarArchiveEntry template)