通过网络进行 Java 序列化

Java serialization over network(通过网络进行 Java 序列化)

本文介绍了通过网络进行 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 序列化

基础教程推荐