You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <ba...@apache.org> on 2008/11/05 15:27:43 UTC

Fwd: bug?- org.apache.tools.bzip2.CBZip2InputStream

---------- Forwarded message ----------
From: Rico Basekow <ba...@mpimp-golm.mpg.de>
Date: Wed, Nov 5, 2008 at 7:23 AM
Subject: bug?- org.apache.tools.bzip2.CBZip2InputStream
To: bayard@apache.org


Hi Henri,

I had a problem to unzip my bzip2 file on linux with Apache Ant 1.7.1.
I added two lines in the org.apache.tools.bzip2.CBZip2InputStream
class, that solved the problem.

private void init() throws IOException {
      this.in.read();// added- read magic0
      this.in.read();// added- read magic1
      int magic2 = this.in.read();
      if (magic2 != 'h') {
...

Best regards
Rico

--
Dipl.-Inform. Rico Basekow
Bioinformatics

MPI fuer Molekulare Pflanzenphysiologie
Wissenschaftspark Golm
Am Muehlenberg 1, 14476 Potsdam, Germany

Tel. +49 (0) 331-5678752
Email: basekow@mpimp-golm.mpg.de

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


Re: Fwd: bug?- org.apache.tools.bzip2.CBZip2InputStream

Posted by Emmanuel Bourg <eb...@apache.org>.
I don't think this is a bug, CBZip2InputStream ignores the 2 bytes 
header by design (not sure why though). This is documented in the javadoc.

Emmanuel Bourg

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