commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject [compress] ar/cpio and last modfied times
Date Fri, 31 Jul 2009 19:41:58 GMT

I've started to implement a commons-compress based antlib over in Ant
and just realized we don't have a common getLastModified() method in
ArchiveEntry - maybe we should have.

What seems to be worse is that we don't really document what the
corresponding methods in ar and cpio entries will return - and we don't
have a single unit test that would set or read them,

To make things even worse, cpio claims it would be seconds since the
epoch but sets it with System.currentTimeMillis when unset
(CpioArchiveOutputStream#putArchiveEntry) which will be milliseconds
since the epoch - who is correct?

And finally (I was keeping the worst for the end) ArArchiveInputStream
won't set the time at all, even if it reads the corresponding bytes -
the writing code looks as if it assumed entry.getLastModified() to be a
in milliseconds since the epoch and wants to write seconds since the

Can anybody more familiar with ar or cpio shed some light on what the
formats really expect?


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

View raw message