An easy way to check the structure of a serialized object?

I have a class, and I would like to see which sub-objects occupy the most space when an object from this class is serialized. Is there a good tool / way to do this other than looking at the code and analyzing it manually?

For example, I would like the tool to say that "member a takes 20%, b 30%, and member c takes 50%."

thank

PS I found some related questions, but could not find an answer to my specific question.

+5
source share
3 answers

- , (, ByteArrayOutputStream), , .

, :

  • ObjectOutputStream , . reset(), .
  • , , . , .
  • ObjectOutputStream ( 4-) .

.

+1

, . , . : VisualVM, JDK YourKit Profiler.

-1

All Articles