Article View: borland.public.jbuilder.java.api
Article #1389Error when Infalting data. java.util.zip.DataFormatException: incomplete literal/length tree
From: S.Thanika
Date: Wed, 13 Feb 2002 08:07
Date: Wed, 13 Feb 2002 08:07
48 lines
2351 bytes
2351 bytes
Hi,
I am trying to inflate a data which is Base64 decoded. And it show me the
following error
java.util.zip.DataFormatException: incomplete literal/length tree
at java.util.zip.Inflater.inflate(Inflater.java:195)
at java.util.zip.Inflater.inflate(Inflater.java:212)
at
com.basebean.Visa3DSpec.VisaCompression.decompress(VisaCompression.java:74)
at com.basebean.Visa3DSpec.Visa3d.main(Visa3d.java:111)
Following is my program
public String decompress(String inStr){
byte[] b2 = new byte[inStr.length()];
b2 = inStr.getBytes();
Inflater decompresser = new Inflater();
decompresser.setInput(b2,0,b2.length);
int xxxxx =0;
try {
xxxxx = decompresser.inflate(b2);
}
catch (Exception e) {
System.out.println("decompress exception ...");
e.printStackTrace();
}
System.out.println("decompress ... " + inStr.length() + " out: " +
xxxxx);
decompresser.reset();
decompresser.end();
String outStr = new String(b2,0,xxxxx);
outStr.trim();
return outStr;
}
I have tried using other method of decompression, and it seem there is
a problem. I am out of my wits, can anyone help me...
-
Regards,
S.Thanika
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.320 / Virus Database: 179 - Release Date: 1/30/02
Technical Details
Message-ID:
<3c6a1fe1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,61819a74cd2046a2,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-02-13 00:19:33 PST From: "S.Thanika" <thanika@firstecom.com> Newsgroups: borland.public.jbuilder.java.api Subject: Error when Infalting data. java.util.zip.DataFormatException: incomplete literal/length tree Date: Wed, 13 Feb 2002 16:07:59 +0800 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 NNTP-Posting-Host: 203.198.196.105 Message-ID: <3c6a1fe1_1@dnews> X-Trace: dnews 1013587937 203.198.196.105 (13 Feb 2002 00:12:17 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews