So is there a way to achieve serializing the primitive data?
EDIT Any Specific Example will be great.
Primitive types can be serialized using DataOutputStream
class and deserialized using DataInputStream
class
All of the primitive types have write methods in the class ObjectOutputStream
. You can serialize any primitive via an ObjectOutputStream
in this manner. For details see the Java API page for ObjectOutputStream
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With