Ah, you want to know why a specific exception is being thrown and not just in general. I don't think we'd be able to help you without being able to see the code that's causing the exception in the first place. If you could provide that, we should hopefully be able to pinpoint your problem
You're reading serialized objects, right? I'm guessing that there's a mismatch between how you write the object and how you read it. You should probably show us the code that writes the object as well as the code that reads it.
I don't see any obvious problem - the code looks good. I would try testing some simplified code to see if that can provide clues. For example, try removing the GZIP classes from the processes - temporarily, just for testing. Does that affect the error at all? And it looks like you are sending the file as an attachment in mail. What happens if you try to read the GZipMailFile from the file immediately after writing it? If you can read the file without errors, that would be a clue that maybe the problem is somewhere in your emailing code instead. Perhaps there's something there which is causing data corruption.
I also need some help on an error I am encountering while using CheckedOutputStream, CheckedInputStream, ZipOutputStream and ZipInputStream. Can anyone give me some links or should I present my problem here?