如果特里结构安装你的错误加密的压缩文件:
Exception in thread "main" java.util.zip.ZipError: invalid CEN header (encrypted entry)
at com.sun.nio.zipfs.ZipFileSystem.zerror(ZipFileSystem.java:1605)
at com.sun.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1064)
at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:130)
at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:139)
at java.nio.file.FileSystems.newFileSystem(FileSystems.java:390)
致人行
if ((ZipConstants.CENFLG(arrayOfByte1, i) & 0x1) != 0)
zerror("invalid CEN header (encrypted entry)");
所以异常被抛出每个加密项。因此,ZipFileSystem目前不支持加密文件(Java 8)。
我可以虚心推荐[Apache VFS](https://commons.apache.org/proper/commons-vfs/)软件包吗? – PaulProgrammer
re:Apache VFS:它看起来很有趣,但我需要它来支持java.nio.file.Filesystem,它看起来像VFS没有;我猜Apache在NIO2之前做了他们自己的事情。 –