当前位置:网站首页>Advanced API (serialization & deserialization)
Advanced API (serialization & deserialization)
2022-07-03 07:01:00 【Bugxiu_ fu】
serialize ObjectOutputStream
Save the objects generated in memory to a text file
All classes to be serialized must implement Serializable Interface
Student implements Serializable{
private static final long serialVersionUID = 1L;
}
Deserialization ObjectInputStream
The contents of the local file ( object )-- Read to memory
The basic format :
serialize
Prepare an object
Student stu = new Student(1, " Huqing stick ");
File file = new File("D:\\stu.bak");
FileOutputStream fos = new FileOutputStream(file);
Write through serialized stream ObjectOutputStream
ObjectOutputStream oos = new ObjectOutputStream(fos);
Write an object through the serialization stream
oos.writeObject(stu);
close
oos.close();
fos.close();
边栏推荐
- Summary of UI module design and practical application of agent mode
- JS date comparison
- Centos切换安装mysql5.7和mysql8.0
- MySQL syntax (basic)
- Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
- Realize PDF to picture conversion with C #
- Practice of enterprise ab/testing platform
- Laravel框架 踩坑(一)
- Unit test framework + Test Suite
- [attribute comparison] defer and async
猜你喜欢

EasyExcel

Realize PDF to picture conversion with C #

New knowledge! The virtual machine network card causes your DNS resolution to slow down

2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
![[Fiddler problem] solve the problem about Fiddler's packet capturing. After the mobile network is configured with an agent, it cannot access the Internet](/img/9d/42dfef67246740f0dba0c6d8f1b625.jpg)
[Fiddler problem] solve the problem about Fiddler's packet capturing. After the mobile network is configured with an agent, it cannot access the Internet

MySQL installation

这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意

Practice of enterprise ab/testing platform
![[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones](/img/d0/850e095a43610366d6144b2471f3f7.jpg)
[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones

Interfaces and related concepts
随机推荐
vmware虚拟机C盘扩容
Realize PDF to picture conversion with C #
UTC时间、GMT时间、CST时间
Understand software testing
JMeter test result output
The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
爬虫代码基础教学
Tool class static method calls @autowired injected service
Asynchronous programming: async/await in asp Net
The dynamic analysis and calculation of expressions are really delicious for flee
mysql误删root账户导致无法登录
Journal quotidien des questions (11)
Flask Foundation
MySQL syntax (basic)
修改MySQL密码
MySQL transaction rollback, error points record
Summary of UI module design and practical application of agent mode
Summary of the design and implementation of the weapon system similar to the paladin of vitality
centos php7.3安装redis扩展
DNS forward query: