aspose file tools*
The moose likes Java in General and the fly likes Recovery from corrupt GZIP file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Recovery from corrupt GZIP file" Watch "Recovery from corrupt GZIP file" New topic
Author

Recovery from corrupt GZIP file

BAPPA BAPPA
Greenhorn

Joined: Dec 11, 2006
Posts: 3
I was writing in GZIP format during which JVM crashed. So the file was corrupted and when I tried to read from the file it said, "Unexpected End of ZLIB ...". Is there any way

1. to recover these types of GZIP files?
2. to handle kill -9 signal using java
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

kill -9 kills the process without giving it a chance to close gracefully. If you use a less abrupt method to close your application then you can use shutdown hooks.

I don't think the file can be recovered.
BAPPA BAPPA
Greenhorn

Joined: Dec 11, 2006
Posts: 3
If i wanna recover any corrupt gzip file what should i do while reading?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"download managers" keep track of the number of bytes sent to the client and then if the connection is reset, they send a HTTP request asking to restart from the point the previous request stopped. I guess you would need to look closer into this and implement it in Java.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

Hi BAPPA BAPPA,

Welcome to JavaRanch!

We have a strict policy on display names, which must be a real first and last name with a space between.

Please go here and fix your display name up, pronto. Thanks, pardner!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Recovery from corrupt GZIP file
 
Similar Threads
GZIP file append writing
Content-Encoding
java.io.IOException: Corrupt GZIP trailer
Access the entry such as entry filename in gzip file
How to gzip more than one files together