Random file access from a tar archive in java

618 views Asked by At

How to do random file access from a tar archive in java? Using apache-commons-compress tarArchiveInputStream there is no method to get the specific file based on its tarArchiveEntry name. For each query for a file object(bytes[]) it is required to iterate through the whole tar file for every time. How to do an efficient programming with tar archives in such cases?

1

There are 1 answers

1
imperial On

Please refer to this earlier case in stackoverflow: How uncompress a specific file from a TAR using apache commons?

OR for better understanding please follow this link: Apache commons