Provides uniform, transparent, thread-safe, read/write access to archive files as if they were just plain directories in a file system path by means of the {@link de.schlichtherle.truezip.nio.file.TPath} class and its dependent classes.
This is the primary API for JSE 7 compliant TrueZIP applications. In contrast to the TrueZIP Kernel API, this API is designed to be easy to learn and convenient to use while providing a great level of flexibility.
This package provides a JSE 7 compliant {@link java.nio.file.spi.FileSystemProvider file system provider} implementation in its class {@link de.schlichtherle.truezip.nio.file.TFileSystemProvider}. If the JAR of this package is present on the run time class path, an application can transparently access archive files without a compile time dependency on this API. However, some restrictions apply in this case because the NIO.2 API does not support file system federation:
FileSystemProvider instance is limited to support
exactly only one
{@link java.nio.file.spi.FileSystemProvider#getScheme() file system provider scheme}.
So the installed TrueZIP file system provider
{@link de.schlichtherle.truezip.nio.file.TFileSystemProvider#TFileSystemProvider() instance}
limits the access to the platform file system, which is
identified by the custom URI
{@link java.net.URI#getScheme() scheme} "{@code tpath}".
ZipFileSystemProvider instance provided by
JSE 7.
So when
{@link java.nio.file.FileSystems#newFileSystem(java.nio.file.Path, java.lang.ClassLoader) probing}
ZIP or JAR files, it's undefined which provider will be used
- see below.
So the only way how an application can use the TrueZIP file system provider instance without a compile time dependency is to use {@link java.nio.file.FileSystems#newFileSystem(java.nio.file.Path, java.lang.ClassLoader)}. However, this is unlikely to get used in most applications.
To overcome these restrictions, an application should directly create {@link de.schlichtherle.truezip.nio.file.TPath} instances by calling one of the public class constructors. Once created, it's safe to use {@code TPath} instances polymorphically as {@link java.nio.file.Path} instances.
Mind that the NIO.2 API provides some features which are not supported by the current implementation of this package. Consequently, if an unsupported method is called, an {@link java.lang.UnsupportedOperationException} is thrown.