Java serialization over network(通过网络进行 Java 序列化)
问题描述
只是想知道是否有用于序列化对象的教程或操作方法,将它们放入网络流中,并在另一端反序列化它.我了解序列化、I/O、流、套接字等的原理,我只想从客户端向服务器发送对象的示例开始.
Just want to know if there's a tutorial or a how-to for serializing objects, putting them into a stream over network, and deserialize it on the other side. I understand the principles of serialization, I/O, streams, sockets, and so on, I just would like an example of a client sending an object to a server to start with.
推荐答案
This (pdf) 是一个有用的教程,它将引导您了解序列化和套接字的基础知识,然后将这两个概念联系在一起(大约在幻灯片的一半)以展示如何序列化对象并从客户端发送它到服务器(无 RMI).我想这正是你想要的.
This (pdf) is a useful tutorial which walks you through the basics of serialisation, and sockets, then ties the two concepts together (about halfway through the slides) to show how to serialise an object and send it from client to server (no RMI). I think that's precisely what you want.
这篇关于通过网络进行 Java 序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:通过网络进行 Java 序列化


基础教程推荐
- 大摇大摆的枚举 2022-01-01
- 从 python 访问 JVM 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01