Java对象的序列化和反序列化[转]
Java基础学习总结——Java对象的序列化和反序列化
一、序列化和反序列化的概念
把对象转换为字节序列的过程称为对象的序列化。
把字节序列恢复为对象的过程称为对象的反序列化。
对象的序列化主要有两种用途:
1) 把对象的字节序列永久地保存到硬盘上,通常存放在一个文件中;
2) 在网络上传送对象的字节序列。
在很多应用中,需要对某些对象进行序列化,让它们离开内存空间,入住物理硬盘,以便长期保存。比如最常见的是Web服务器中的Session对象,当有 10万用户并发访问,就有可能出现10万个Session对象,内存可能吃不消,于是Web容器就会把一些seesion先序列化到硬盘中,等要用了,再把保存在硬盘中的对象还原到内存中。
当两个进程在进行远程通信时,彼此可以发送各种类型的数据。无论是何种类型的数据,都会以二进制序列的形式在网络上传送。发送方需要把这个Java对象转换为字节序列,才能在网络上传送;接收方则需要把字节序列再恢复为Java对象。
二、JDK类库中的序列化API
java.io.ObjectOutputStream代表对象输出流,它的writeObject(Object obj)方法可对参数指定的obj对象进行序列化,把得到的字节序列写到一个目标输出流中。
java.io.ObjectInputStream代表对象输入流,它的readObject()方法从一个源输入流中读取字节序列,再把它们反序列化为一个对象,并将其返回。
只有实现了Serializable和Externalizable接口的类的对象才能被序列化。Externalizable接口继承自 Serializable接口,实现Externalizable接口的类完全由自身来控制序列化的行为,而仅实现Serializable接口的类可以 采用默认的序列化方式 。
对象序列化包括如下步骤:
1) 创建一个对象输出流,它可以包装一个其他类型的目标输出流,如文件输出流;
2) 通过对象输出流的writeObject()方法写对象。
对象反序列化的步骤如下:
1) 创建一个对象输入流,它可以包装一个其他类型的源输入流,如文件输入流;
2) 通过对象输入流的readObject()方法读取对象。
对象序列化和反序列范例:
定义一个Person类,实现Serializable接口
import java.io.Serializable; /**
* <p>ClassName: Person<p>
* <p>Description:测试对象序列化和反序列化<p>
* @author xudp
* @version 1.0 V
* @createTime 2014-6-9 下午02:33:25
*/
public class Person implements Serializable { /**
* 序列化ID
*/
private static final long serialVersionUID = -5809782578272943999L;
private int age;
private String name;
private String sex; public int getAge() {
return age;
} public String getName() {
return name;
} public String getSex() {
return sex;
} public void setAge(int age) {
this.age = age;
} public void setName(String name) {
this.name = name;
} public void setSex(String sex) {
this.sex = sex;
}
}
序列化和反序列化Person类对象
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.text.MessageFormat; /**
* <p>ClassName: TestObjSerializeAndDeserialize<p>
* <p>Description: 测试对象的序列化和反序列<p>
* @author xudp
* @version 1.0 V
* @createTime 2014-6-9 下午03:17:25
*/
public class TestObjSerializeAndDeserialize { public static void main(String[] args) throws Exception {
SerializePerson();//序列化Person对象
Person p = DeserializePerson();//反序列Perons对象
System.out.println(MessageFormat.format("name={0},age={1},sex={2}",
p.getName(), p.getAge(), p.getSex()));
} /**
* MethodName: SerializePerson
* Description: 序列化Person对象
* @author xudp
* @throws FileNotFoundException
* @throws IOException
*/
private static void SerializePerson() throws FileNotFoundException,
IOException {
Person person = new Person();
person.setName("gacl");
person.setAge(25);
person.setSex("男");
// ObjectOutputStream 对象输出流,将Person对象存储到E盘的Person.txt文件中,完成对Person对象的序列化操作
ObjectOutputStream oo = new ObjectOutputStream(new FileOutputStream(
new File("E:/Person.txt")));
oo.writeObject(person);
System.out.println("Person对象序列化成功!");
oo.close();
} /**
* MethodName: DeserializePerson
* Description: 反序列Perons对象
* @author xudp
* @return
* @throws Exception
* @throws IOException
*/
private static Person DeserializePerson() throws Exception, IOException {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(
new File("E:/Person.txt")));
Person person = (Person) ois.readObject();
System.out.println("Person对象反序列化成功!");
return person;
} }
代码运行结果如下:
序列化Person成功后在E盘生成了一个Person.txt文件,而反序列化Person是读取E盘的Person.txt后生成了一个Person对象
三、serialVersionUID的作用
serialVersionUID: 字面意思上是序列化的版本号,凡是实现Serializable接口的类都有一个表示序列化版本标识符的静态变量
private static final long serialVersionUID
实现Serializable接口的类如果类中没有添加serialVersionUID,那么就会出现如下的警告提示
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvIAAACpCAIAAADGL04GAAAgAElEQVR4nO19fXAd1ZVnz2Zrdv/Z2SQ7yexHzex8FswXWxlmNgshA1VhK5AppxLPvJQDgYhRYjLMLCZNyIgxKTns4FlVQsCprGNVrxggcgkSjIMRYqZfHDwy2EQyUYDGSDYSloMDbj/pgRxsGUk++8d93X0/zr19u1+/Dz2dU79SPfW799zP9+7vnXvuPU7l5GTl5OQjD/X/3fZX/277q+xfM8BWpof7x8wpsmgT5NT+8a/sP5MvLwkJCQkJCUlHitM4WjM93DM8nZImL62pPPDZlw/nyklCQkJCQkLSqVI0rZke7oklldTkpTVkqiEhISEhISFRpYHWGhvJpa3ywGfHfzhXYC1ISEhISEhIOkFWI60hISEhISEhIUHERGvmy7tO33n7fHkX0RoSEhISEhKS9hcNrTkytvK+/7D0B797+qs9S3/wu0v/8f2Vo+NEa0hIcorjELKBhISEJJcgtGZ+356lC39n7sdPxTxm7sdPLf32b8zvf4JoDQlJHqF1OpNQd5GQkOQVhda8uP/8+9/Pp4jJzcp73l05fJBoDQlJZqF1OpNQd5GQkOQVmdasXHbZWzs+XvnuFZVHPlL57hXVvTdAxGyqT3733Ic+SLSGhCSz0DqdSai7SEhI8opAa/7vl3cvXfC+hae64fUnGE4/1f3WUxshYjZLf/C78+VdBRZPtIZkTQit05mEuouEhCSvCLTmuQ+uP33zBcsnd6+88Wj8t7L7cohozcLd//vsNX9eYPFEa0jWhNA6nUmou0hISPJKQmu+ck9w5IIPVf/p8qXqnuWFA8sLTy8vHFia3zP35OVx6srJyXOXfXBlcRGi+4T7x6qSxupYfwNvGQ5HB5xSr1MaCZA3q/7WXqfU65R6vSnlzakRpzTgV7IVZyfGchsovuvw4vphM0vPKAX0f6v6uVZ0PYVG63QyZJ7nuX49VQo82xEPo1LR9PZ6dNXQTT1zuSZBaU3ou+0+yUlISFovCa25u3fvqff/xrx/yeLC7pXlysrSay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Hj7x2466ITB++fvOKqGC2fzQQCgUBYg2BBLtnrxtOa6WHOWjOcZqxpsstw4DmO64dNLLEhgtKaZ145yhjJuq7NMP/jxZmZdV2bP37PXmaz+dn8OYbDH/jA1LNl3chKShi5YUpOHzj0xv33T27oeuP++4/dsoVoDYFAIBBaAkZrAKDSBFojPEBsObJUyFqTXVBas+G2bYyFMJyonFtaPv+zuXMbbtv287Mrr1XOxXhq+EHdyKpK4DAwJWempgDgjXvvBYA37r+faA2BQCAQWgW2Glaa7FtDtKZBgtKaj9+zl5lY1nVtfiV8cl3X5rD6DrO1zIaLPB6472u6kTUomdzQVeM09947uaGLaA2BQCAQWo7CaA3nQSO50fDvpJ/wrhCtyS46a838wtL8wjvzp99Z17X5V6/++/mFpfnTSxtu2/bqyUUe93l360bWoIRoDYFAIBBaBd6fppG+NXVLsdoM0vH31kwde4XZWhbOLC28vbRwZil2i3nr7eVXXj8bw+u/RzeyBiW0CUUgEAiEVoH3p2mkb03dUqy2NSK6e2v+8//86sfv2XtmcXld1+Yzi8vsENPhwy8ePvzijh3beBgGF1VSfXyEdxl+4957idYQCAQCoZlgK6D0mmhNJ4jhOr6pY6/wV87kmzqqEv5cNx3wJhAIBEKbgGhNJ0jqLcMEAoFAIKx26PxpyLem04RoDYFAIBA6Hjp/GvKt6TQhWkMgEAiEtQC26hleE63pBCFaQyAQCARChWhNZ0hMawgEAoFAWOMgWrPq5a3qcbazSCAQCAQCoRhaw64TVsMjJNcMp18yTLQmj3xx0+cIBAKBQCDEiJfInLSmOtbfMzyNRvCOAylMDyOkRxKiNSQkJCQkJCRFSSNDXcL0cBIrCheiNSQkJCQkJCRFScG0hrfWVMf6UzeiiNaQkJCQkJCQFCX/H4VYfZewWO5FAAAAAElFTkSuQmCC">
用鼠标点击就会弹出生成serialVersionUID的对话框,如下图所示:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAADPCAIAAACY8ZVSAAAgAElEQVR4nO19W3MUR5p2/4jvZm/mai92Lz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z182lM2mmRJn2wPCi7SRylLw8LzzfVQycrBhiMg1KooG4dmBlGhwss614deg55MyGNOiSY99MPJWqPquCTIOQgrN2hwBMtuqQjosSMXSr0jCdUlBKmQa3ooGfaaA9tObZ2iP0Xg7wnobeBvZzlxAN4QOiAYg9qKcn2MvG7Klt+RmHcop1M3V9ly1R42QmvZK4kGw/u33xQKvtAooLy5VW5ui442LvaXhx847M5iUvbs7khHfmt2Y2r0sz9zRILXNa8eowc8iZDeLuBOkdHqWL61a2XGFWOZbp/S7siLo/QNE9cu2xvbP3c1CtzArmKb54edArwavPznYk43px5br05iXWMiPHFVCmId+Ssn/iEqKharBEAwjGmHgjpDeWb5pz95iJt1bg/cAAMg35bDqZTGfzvCcmIBrCx/WpSzX/hAkIVoEQDSBYc/rNNOQakkn2qgREQxVhJfFAMN5MAACgAazo4z7TkG8pP25ZgnWFwnzesoJUC0QDAAAAAMQGeCMkAAAAAABKwBshAQAAAABQAjINAAAAAAAo4X8B6VahRUTxQnEAAAAASUVORK5CYII=">
serialVersionUID有两种生成方式:
采用这种方式生成的serialVersionUID是1L,例如:
private static final long serialVersionUID = 1L;
采用这种方式生成的serialVersionUID是根据类名,接口名,方法和属性等来生成的,例如:
private static final long serialVersionUID = 7592930394427200495L;
添加了之后就不会出现那个警告提示了,如下所示:
扯了那么多,那么serialVersionUID(序列化版本号)到底有什么用呢,我们用如下的例子来说明一下serialVersionUID的作用,看下面的代码:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable; public class TestSerialversionUID { public static void main(String[] args) throws Exception {
SerializeCustomer();// 序列化Customer对象
Customer customer = DeserializeCustomer();// 反序列Customer对象
System.out.println(customer);
} /**
* MethodName: SerializeCustomer
* Description: 序列化Customer对象
* @author xudp
* @throws FileNotFoundException
* @throws IOException
*/
private static void SerializeCustomer() throws FileNotFoundException,
IOException {
Customer customer = new Customer("gacl",25);
// ObjectOutputStream 对象输出流
ObjectOutputStream oo = new ObjectOutputStream(new FileOutputStream(
new File("E:/Customer.txt")));
oo.writeObject(customer);
System.out.println("Customer对象序列化成功!");
oo.close();
} /**
* MethodName: DeserializeCustomer
* Description: 反序列Customer对象
* @author xudp
* @return
* @throws Exception
* @throws IOException
*/
private static Customer DeserializeCustomer() throws Exception, IOException {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(
new File("E:/Customer.txt")));
Customer customer = (Customer) ois.readObject();
System.out.println("Customer对象反序列化成功!");
return customer;
}
} /**
* <p>ClassName: Customer<p>
* <p>Description: Customer实现了Serializable接口,可以被序列化<p>
* @author xudp
* @version 1.0 V
* @createTime 2014-6-9 下午04:20:17
*/
class Customer implements Serializable {
//Customer类中没有定义serialVersionUID
private String name;
private int age; public Customer(String name, int age) {
this.name = name;
this.age = age;
} /*
* @MethodName toString
* @Description 重写Object类的toString()方法
* @author xudp
* @return string
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "name=" + name + ", age=" + age;
}
}
运行结果:
序列化和反序列化都成功了。
下面我们修改一下Customer类,添加多一个sex属性,如下:
class Customer implements Serializable {
//Customer类中没有定义serialVersionUID
private String name;
private int age; //新添加的sex属性
private String sex; public Customer(String name, int age) {
this.name = name;
this.age = age;
} public Customer(String name, int age,String sex) {
this.name = name;
this.age = age;
this.sex = sex;
} /*
* @MethodName toString
* @Description 重写Object类的toString()方法
* @author xudp
* @return string
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "name=" + name + ", age=" + age;
}
}
然后执行反序列操作,此时就会抛出如下的异常信息:
1 Exception in thread "main" java.io.InvalidClassException: Customer;
2 local class incompatible:
3 stream classdesc serialVersionUID = -88175599799432325,
4 local class serialVersionUID = -5182532647273106745
意思就是说,文件流中的class和classpath中的class,也就是修改过后的class,不兼容了,处于安全机制考虑,程序抛出了错误,并且拒绝载入。那么如果我们真的有需求要在序列化后添加一个字段或者方法呢?应该怎么办?那就是自己去指定serialVersionUID。在TestSerialversionUID例子中,没有指定Customer类的serialVersionUID的,那么java编译器会自动给这个class进行一个摘要算法,类似于指纹算法,只要这个文件 多一个空格,得到的UID就会截然不同的,可以保证在这么多类中,这个编号是唯一的。所以,添加了一个字段后,由于没有显指定 serialVersionUID,编译器又为我们生成了一个UID,当然和前面保存在文件中的那个不会一样了,于是就出现了2个序列化版本号不一致的错误。因此,只要我们自己指定了serialVersionUID,就可以在序列化后,去添加一个字段,或者方法,而不会影响到后期的还原,还原后的对象照样可以使用,而且还多了方法或者属性可以用。
下面继续修改Customer类,给Customer指定一个serialVersionUID,修改后的代码如下:
class Customer implements Serializable {
/**
* Customer类中定义的serialVersionUID(序列化版本号)
*/
private static final long serialVersionUID = -5182532647273106745L;
private String name;
private int age; //新添加的sex属性
//private String sex; public Customer(String name, int age) {
this.name = name;
this.age = age;
} /*public Customer(String name, int age,String sex) {
this.name = name;
this.age = age;
this.sex = sex;
}*/ /*
* @MethodName toString
* @Description 重写Object类的toString()方法
* @author xudp
* @return string
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "name=" + name + ", age=" + age;
}
}
重新执行序列化操作,将Customer对象序列化到本地硬盘的Customer.txt文件存储,然后修改Customer类,添加sex属性,修改后的Customer类代码如下:
class Customer implements Serializable {
/**
* Customer类中定义的serialVersionUID(序列化版本号)
*/
private static final long serialVersionUID = -5182532647273106745L;
private String name;
private int age; //新添加的sex属性
private String sex; public Customer(String name, int age) {
this.name = name;
this.age = age;
} public Customer(String name, int age,String sex) {
this.name = name;
this.age = age;
this.sex = sex;
} /*
* @MethodName toString
* @Description 重写Object类的toString()方法
* @author xudp
* @return string
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "name=" + name + ", age=" + age;
}
}
执行反序列操作,这次就可以反序列成功了,如下所示:
四、serialVersionUID的取值
serialVersionUID的取值是Java运行时环境根据类的内部细节自动生成的。如果对类的源代码作了修改,再重新编译,新生成的类文件的serialVersionUID的取值有可能也会发生变化。
类的serialVersionUID的默认值完全依赖于Java编译器的实现,对于同一个类,用不同的Java编译器编译,有可能会导致不同的 serialVersionUID,也有可能相同。为了提高serialVersionUID的独立性和确定性,强烈建议在一个可序列化类中显示的定义serialVersionUID,为它赋予明确的值。
显式地定义serialVersionUID有两种用途:
1、 在某些场合,希望类的不同版本对序列化兼容,因此需要确保类的不同版本具有相同的serialVersionUID;
2、 在某些场合,不希望类的不同版本对序列化兼容,因此需要确保类的不同版本具有不同的serialVersionUID。
转 http://www.cnblogs.com/xdp-gacl/p/3777987.html
Java对象的序列化和反序列化[转]的更多相关文章
- Java对象的序列化与反序列化
序列化与反序列化 序列化 (Serialization)是将对象的状态信息转换为可以存储或传输的形式的过程.一般将一个对象存储至一个储存媒介,例如档案或是记亿体缓冲等.在网络传输过程中,可以是字节或是 ...
- Java对象的序列化与反序列化-Json篇
说到Java对象的序列化与反序列化,我们首先想到的应该是Java的Serializable接口,这玩意在两个系统之间的DTO对象里面可能会用到,用于系统之间的数据传输.或者在RPC(远程方法调用)时可 ...
- 一文带你全面了解java对象的序列化和反序列化
摘要:这篇文章主要给大家介绍了关于java中对象的序列化与反序列化的相关内容,文中通过详细示例代码介绍,希望能对大家有所帮助. 本文分享自华为云社区<java中什么是序列化和反序列化?>, ...
- Java基础学习总结——Java对象的序列化和反序列化
一.序列化和反序列化的概念 把对象转换为字节序列的过程称为对象的序列化. 把字节序列恢复为对象的过程称为对象的反序列化. 对象的序列化主要有两种用途: 1) 把对象的字节序列永久地保存到硬盘上,通常存 ...
- Java对象的序列化和反序列化
对象的序列化是指将对象转换为字节序列的过程 对象的反序列化是指将字节序列恢复对象的过程 主要有两种用途: 1.把对象的字节序列永久地保存在硬盘上,通常放在一个文件中. 2.在网络上传输对象的字节序列. ...
- java对象的序列化与反序列化使用
1.Java序列化与反序列化 Java序列化是指把Java对象转换为字节序列的过程:而Java反序列化是指把字节序列恢复为Java对象的过程. 2.为什么需要序列化与反序列化 我们知道,当两个进程进 ...
- Java对象的序列化和反序列化实践
2013-12-20 14:58 对象序列化的目标是将对象保存在磁盘中,或者允许在网络中直接传输对象.对象序列化机制允许把内存中的Java对象转换成平台无关的二进制流,从而允许把这种二进制流持久的保存 ...
- Java基础学习总结--Java对象的序列化和反序列化
一.序列化和反序列化的概念 把对象转换成字节序列的过程称之为对象的序列化 把字节序列恢复为对象的过程称之为对象的反序列化 对象序列化的主要用途: 1)把对象的字节序列永久的保存到硬盘上,通常放在一个文 ...
- 深入理解Java对象的序列化与反序列化的应用
当两个进程在进行远程通信时,彼此可以发送各种类型的数据.无论是何种类型的数据,都会以二进制序列的形式在网络上传送.发送方需要把这个Java对象转换为字节序列,才能在网络上传送:接收方则需要把字节序列再 ...
随机推荐
- 数往知来C#之面向对象准备〈一〉
1.CLR加载编译源文件 注1.:当你点击调试或者生成解决方案的时候这就是一个编译过程首先CLR加载源文件也就是你写的代码(此代码在文件中是字符串)然后将项目中的嗲吗编译成IL代码进而生成程序集 证明 ...
- sudo source /etc/profile 提示找不到source命令
今天修改了/etc/profile,需要用source一下,于是写入命令 sudo source /etc/profile 提示找不到source命令 改成 sudo . /etc/profil ...
- JAVA中的数据结构——集合类(线性表:Vector、Stack、LinkedList、set接口;键值对:Hashtable、Map接口<HashMap类、TreeMap类>)
Java的集合可以分为两种,第一种是以数组为代表的线性表,基类是Collection:第二种是以Hashtable为代表的键值对. ... 线性表,基类是Collection: 数组类: person ...
- storm的安装配置
一.安装Zookeeper 1.设置.profile文件: export ZOOKEEPER_HOME=/home/hadoop/streamdata/zookeeper-3.4.5-cdh4.5.0 ...
- MEAN stack 做网站【1】
做一个小project,学习如何用MEAN技术栈来搭建网站. JavaScript新手,不足之处,请指出.(系统为win10) 搭建环境: 安装Node.JS (略过) 安装MySQL,MongoDB ...
- Uva 208 - Firetruck
[题目链接]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&p ...
- 排序算法之快速排序(java实现)
package com.javaTest300; public class Test039 { public static void main(String[] args) {// 快速排序 int ...
- UVALive 7279 Sheldon Numbers (暴力打表)
Sheldon Numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/127406#problem/H Description According t ...
- [iOS基础控件 - 6.10.2] PickerView 自定义row内容 国家选择Demo
A.需求 1.自定义一个UIView和xib,包含国家名和国旗显示 2.学习row的重用 B.实现步骤 1.准备plist文件和国旗图片 2.创建模型 // // Flag.h // Co ...
- Castle IOC容器快速入门
主要内容 1.为什么要IOC 2.什么是Castle IOC容器 3.快速入门示例 4.几个重要的概念 一,为什么要IOC IOC(控制反转或者叫依赖注入)Martin Fowler大师在他的文章中已 ...