| 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
|
|
|
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.
|
 |
 |
|
|
subject: java.io.IOException: Corrupt GZIP trailer
|
|
|