This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes java.io.IOException: Corrupt GZIP trailer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "java.io.IOException: Corrupt GZIP trailer" Watch "java.io.IOException: Corrupt GZIP trailer" New topic
Author

java.io.IOException: Corrupt GZIP trailer

Romeo Ranjan
Ranch Hand

Joined: Feb 23, 2009
Posts: 90
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.


SCJP 6.0
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12924
    
    3

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Romeo Ranjan
Ranch Hand

Joined: Feb 23, 2009
Posts: 90
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

Joined: Oct 27, 2005
Posts: 19216

Are you sure it's a GZIP file? Is it not a regular ZIP file?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Romeo Ranjan
Ranch Hand

Joined: Feb 23, 2009
Posts: 90
Yes it I am sure its a GZIP file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.io.IOException: Corrupt GZIP trailer
 
Similar Threads
connection problem...
java.util.zip in Thread Dump ?
java.io.IOException: Premature EOF
Problem reading UTF-8 file
Awkward Memory Issues