Search code examples
javafilefilesystemsarchive

Handling archive contents as VFS?


I'm implementing someting like a file browser.Now I'm trying to recognize files inside archive virtually -the user could browse these files and return to other files in the filesystem-. So what is the best practice for this as I thought I do the following:

 public class VFile extends java.io.File{
     File archiveParent;
     ....
  }

Is there something better or any Library that could solve this in an easier way?

Thanks


Solution

  • There is Apache Commons VFS, which also supports "mounting" archive files (zip, jar, tar, gzip, bzip2).