阅读(4310)
赞(0)
序列化 serialization
2017-07-03 15:45:58 更新
Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream.
JAVA中实现serialization主要靠两个类:
- ObjectOuputStream
- ObjectInputStream
他们是JAVA IO系统里的OutputStream和InputStream的子类
自定义序列化的作用如下:
- Persist only meaningful data.
- Manage serialization between different versions of your class.
- Avoid exposing the serialization mechanism to client API.
Reference
← 数组相关问题