Saving object state on Java without using external memory
- by TryHarder
Good day.
I know that in order to save object state in Java I should use serialization. But in every single topic about serialization states that I must save my object somewhere (disk, network). My problem is that I'm not allowed to do so. I need a way to save and recover object state without writing it on "external" memory. Maybe to save it on heap or stack...
Please don't offer to clone it, I'm not allowed to do so as well.
Thanks.