将存档内容作为 VFS 处理?
我正在实现类似文件浏览器的东西。现在我正在尝试虚拟地识别存档内的文件 - 用户可以浏览这些文件并返回到文件系统中的其他文件 - 。那么,当我认为我做了以下事情时,最佳实践是什么:
public class VFile extends java.io.File{
File archiveParent;
....
}
是否有更好的东西或任何库可以以更简单的方式解决这个问题?
谢谢
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
有 Apache Commons VFS,它也是 支持“挂载”存档文件(zip、jar、tar、gzip、bzip2)。
There is Apache Commons VFS, which also supports "mounting" archive files (zip, jar, tar, gzip, bzip2).