Support comment and extra attributes with zipfs
xueming.shen at oracle.com
Wed Sep 14 16:24:58 UTC 2016
On 9/14/16 8:47 AM, Marco Hunsicker wrote:
> 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 available...
> 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 ZipFileSystem.java), but the attribute is
> not exposed to the outside world (through ZipFileAttributeView.java).
> 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