• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Recovery from corrupt GZIP file  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i wanna recover any corrupt gzip file what should i do while reading?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!