Support comment and extra attributes with zipfs

Marco Hunsicker jdk at
Wed Sep 14 15:47:42 UTC 2016


great to see that the zip file system provider has been promoted to 
official status! I've recently started to play with it and I really like 
the unified way to perform I/O. I wish there were already more providers 

Anyway, I've ran into a major problem with zipfs for my needs: setting 
and getting comments for individual entries is not supported!

I've created a ticket (Review ID: JI-9043744), but thought a message 
here probably won't hurt.

The basic bits are there (in, but the attribute is 
not exposed to the outside world (through 
The necessary changes are trivial though. Maybe this would be something 
that could still be added in time for Java 9?

I've applied the necessary changes to my local copy of the JDK 8 demo 
sources and find it working well for me. Please let me know if you need 
any details.

The "extra" attribute is missing support as well, but here the situation 
seems to be worse. I was not able to read an extra attribute that has 
been set with the oldschool API after applying the same changes as for 
the "comment" attribute (Linux 64 bit JDK 8.0_102-b14). There might be a 
a bug with ZipFileSystem.Entry.

Looking at the test harness, I could not find any tests that deal with 
zip specific attributes, but I might be missing something. Thanks.


More information about the nio-dev mailing list