For serializing large enum instances, I was thinking of using a “serialization proxy” where the proxy object would be a very small object uniquely identifying the corresponding enum instance. However I found out that any read/writeObject or resolve/replace methods are ignored for enums. So my question is, how would I efficiently serialize large enum instances? A String/XML representation is a possibility, but my feeling is this would be a maintenance issue.
For serializing large enum instances, I was thinking of using a serialization proxy where
Share
You’re reinventing what is already done by default by the Java serialization:
Quote from
http://docs.oracle.com/javase/1.5.0/docs/guide/serialization/relnotes15.html: