我开始与面向对象编程(OOP)和想知道:什么是序列化的意义在面向对象的说法?
当前回答
序列化只不过是将Java支持的对象转换为文件支持的形式
(OR)
将Java支持的形式转换为网络支持的形式..序列化的主要范围只是将数据从一层传输到另一层…只有序列化的对象,我们可以通过网络发送。
其他回答
序列化是将数据转换为由字节组成的线性“字符串”。
其他人或多或少也说过同样的事情,但我强调计算机模型要求数据适合一维寻址RAM或持久存储。
大多数“数据”本质上是可序列化的(即使你必须将抽象模型简化为线性模型);不可序列化的是网络连接或复杂的基于状态的机器,如解析器。
序列化只不过是将Java支持的对象转换为文件支持的形式
(OR)
将Java支持的形式转换为网络支持的形式..序列化的主要范围只是将数据从一层传输到另一层…只有序列化的对象,我们可以通过网络发送。
序列化是将无序数据(如对象)转换为一系列标记的过程,这些标记以后可用于重建原始数据。序列化形式通常是一个文本字符串,但不一定非得是这样。
序列化是将对象转换为字节流以存储对象或将其传输到内存、数据库或文件的过程。它的主要目的是保存对象的状态,以便在需要时能够重新创建它。
When instantiating (constructing) the actual object(the thing) from a class (blueprint) there is a need to save the object (thing) by serializing it (breaking it down to its basic atomic structure) to a space in memory. (Kind of like Star Treks Transporter). You break the thing down into it stream of information that can be transported somewhere and stored. Then when you want to reconstruct the thing you just pull the atomically stored instance back into the object. Different from instaniation.