List .zip directories without extracting

前端 未结 3 1340
半阙折子戏
半阙折子戏 2020-12-03 06:06

I am building a file explorer in Java and I am listing the files/folders in JTrees. What I am trying to do now is when I get to a zipped folder I want to list its contents,

3条回答
  •  自闭症患者
    2020-12-03 06:23

    For handling ZIP files you can use class ZipFile. It has method entries() which returns list of entries contained within ZIP file. This information is contained in the ZIP header and extraction is not required.

提交回复
热议问题