2 Replies Latest reply on Mar 25, 2010 6:54 PM by 843790

    How to monitor the progress of writing to an ObjectOutputStream?

      My app reads and writes large serialized objects to files and I'd like to monitor the progress of this. Reading an object in works fine, because I can get the total size of the file in bytes first, and then update the progress as the bytes are read in. However, when writing a file out, I'm unsure how to get the total size of an object in bytes when it gets serialized, which I believe I would need to find out what percent done the operation is. Is there a way to find out how much space an object is taking up in memory or how much it will take up when serialized? If not, is there another way to monitor the progress?