All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.schlichtherle.truezip.file.package.html Maven / Gradle / Ivy





    Package Summary
    
        

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 TFile* classes and their dependent classes.

This is the primary API for JSE 6 compliant TrueZIP applications: Like the TrueZIP Path API, this API is a facade for the TrueZIP Kernel API. In contrast to the TrueZIP Path API however, this API is limited to access the platform file system and any archive files within the platform file system. In contrast to the TrueZIP Kernel API, both APIs are designed to be easy to learn and convenient to use while providing a great level of flexibility. Because all virtual file system state is managed by the TrueZIP Kernel module, this module can concurrently access the same file systems than the TrueZIP Path module.

For example, an application could access an entry within an archive file using a {@code TFile} like this:


    File file = new TFile("archive.tar.gz/README.TXT");
    InputStream in = new TFileInputStream(file);
    try {
        // Read the file contents here.
        ...
    } finally {
        in.close();
    }
        

This example requires that the JARs of the file system driver modules TrueZIP Driver File and TrueZIP Driver TAR are present on the run time class path.

Note that this API can only access the platform file system and any archive files within the platform file system. If you need to access other (virtual) file systems, e.g. HTTP(S), then please consider using the TrueZIP Path API or the TrueZIP Kernel API instead.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy