commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [COMPRESS] PKWare header questions
Date Sun, 13 Dec 2015 17:52:40 GMT
On 2015-12-13, Bear Giles wrote:

> 1. I created the PKWareExtraHeader as a marker - it should make it clear
> that the headers will only be present in PKWare-created files and everyone
> else can ignore them.

OK, understood. I'll add a few sentences as javadocs.

> 2. ExtraFieldUtils and Tests - I'm not that familiar with the code since
> I'm more focused on the crypto than the general functionality. The former
> is an oversight.

OK, easily fixed ;-)

> The latter is something that stumped me. During development I had
> System.out statements that verified I was reading the expected values
> but we obviously don't want to leave that in the final code. Is there
> a way to read a file and then inspect all of the headers within the
> test framework?

I wouldn't call our tests a framework, they've somewhat grown into
existence. You may want to look at the existing extra field tests. Some
of then mainly parse byte[] and try to verify roudtrips work (if they
can be read and written). Some are accompanied by small ZIP archives
that get read.  X5455_ExtendedTimestampTest is an example that performs
both kinds of tests.

If you've got an archive to share that exhibits all the headers we now
can parse thanks to your code, then it should be straight forward to
assert their contents mich the same way
X5455_ExtendedTimestampTest#testSampleFile works.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message