commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@dreamthought.com
Subject Re: Unable to detect wrong TAR archives
Date Tue, 14 Jun 2005 14:38:21 GMT
Hi Cristi,

> I am using the Apache Jakarta Commons Compress library to
> untar .tar files. All works fine until I try to untar a
> file with the .tar extension but whose contents is not a
> well formed TAR file.

Have you considered writing a wrapper around Compress which contains your
input stream and checks the first record in the tar using getNextEntry()
for a non-null entry, otherwise throwing an exception.

Cheers,

Raf



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message