• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Corrupt GZIP trailer  RSS feed

 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

My code tries to unzip a folder read the file in it and display the contents of the file. But while doing it I get this error. I did google for this error and saw a post in this forums but nothing is directing me towards a solution.
Here is the code snippet and the error





The file size is 2.52GB. I use jdk1.5.0_04.

Hope someone could help me with a solution.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try unzipping the ZIP file with a regular unzip program? Does it work without errors or not? If it also gives an error, then maybe the ZIP file is really corrupt.
 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I unzipped the folder to see the file and its contents, it works just fine. Its not corrupt. The problem is I am expected to unzip the folder programmatically and not manually. So I need help to solve the issue.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure it's a GZIP file? Is it not a regular ZIP file?
 
Romeo Ranjan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it I am sure its a GZIP file.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!