• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Not in GZIP format

 
tukai chakraborty
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have a file which is in compressed form without any extension.(say A)
My requirement is to rename it to A.gz and then extract it to a file and save it to B ,the data in which can be viewed using a WordPad.
What I am doing is as follows:-
1)renaming it to A.gz
2)trying to extract this gz file using GZIPInputStream.
But when I am executing my program I am getting the following error:-
java.io.IOException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:131)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
at GZip.main(GZip.java:16)
Can any one please tell me y I am geting this error.
Thanks in Advance
Koushik
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You renamed the file but obviously it will not be in a .gz format. So i think we can't do that.
Its just my opinion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!