需要Java中的序列化 [英] Need of serialization in Java

查看:77
本文介绍了需要Java中的序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我在Java中需要什么样的序列化以及解释需求的示例场景。我不需要定义。

Can anyone tell me what is the need of Serialization in Java and an example scenario to explain the need . I dont need the definition .

推荐答案

当需要通过网络发送数据或存储在文件中时,通常会使用序列化。数据我的意思是对象而不是文本。

Serialization is usually used When the need arises to send your data over network or stored in files. By data I mean objects and not text.

现在问题是你的网络基础设施和你的硬盘是理解位和字节而不是JAVA对象的硬件组件。

Now the problem is your Network infrastructure and your Hard disk are hardware components that understand bits and bytes but not JAVA objects.

序列化是将Java对象的值/状态转换为字节,以通过网络发送或保存。

Serialization is the translation of your Java object's values/states to bytes to send it over network or save it.

这类似于您的语音通过PSTN电话线传输的方式。

This is analogous to how your voice is transmitted over PSTN telephone lines.

这篇关于需要Java中的序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆