storage - What is the best way to store objects on disk in java? -


I want to save any type of item to a file and want to restore it at any time.

I use it for an object-oriented storage that I want to make. Serialization is not a solution because many classes do not apply serial jubals.

Thanks

Some things were never stored and retrieved, Will break up in the way if you try to use any of the basic resources (file handles, sockets, etc.), that is a prime example. This is why the serializable interface is present; This partially serves as a guarantee that writing the object and reading it back will not cause odd issues.

If you want to see it in any way, you can use the reflection to get the subject matter of the object and bring it into the luggage. But this would be a very bad idea


Comments