通过网络进行 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.
相关文章