This content has been marked as final. Show 3 replies
You can extends ByteArrayOutputStream to see each block of data as it is passed.
However, the serialization should typically complete in sub second timing so monitoring its progress may not be very useful.
It is possible to monitor any stream by writing a FilterInputStream or FilterOutputStream. See for example javax.swing.ProgressMonitorInputStream.
As Peter suggests, the performance of an individual readObject() or writeObject() method will be unmeasurable, unless you are writing enormous object graphs.
object I am serializing/deserializing can be hundreds of MB large...
ProgressMonitorInputStream saved my day