本月博客排行
-
第1名
Xeden -
第2名
fantaxy025025 -
第3名
bosschen - paulwong
- johnsmith9th
- zysnba
年度博客排行
-
第1名
青否云后端云 -
第2名
宏天软件 -
第3名
gashero - gengyun12
- wy_19921005
- vipbooks
- e_e
- benladeng5225
- wallimn
- ranbuijj
- javashop
- jickcai
- fantaxy025025
- zw7534313
- qepwqnp
- robotmen
- 解宜然
- ssydxa219
- zysnba
- sam123456gz
- sichunli_030
- tanling8334
- arpenker
- gaojingsong
- xpenxpen
- kaizi1992
- wiseboyloves
- jh108020
- xyuma
- ganxueyun
- wangchen.ily
- xiangjie88
- Jameslyy
- luxurioust
- mengjichen
- lemonhandsome
- jbosscn
- nychen2000
- zxq_2017
- lzyfn123
- wjianwei666
- forestqqqq
- ajinn
- siemens800
- hanbaohong
- 狂盗一枝梅
- java-007
- zhanjia
- 喧嚣求静
- Xeden
最新文章列表
Item 78: Consider serialization proxies instead of serialized instances
1. The serialization proxy pattern is reasonably straightforward. First, design a private static nested class of the serializable class that concisely represents the logical state of an instance of ...
Item 77: For instance control, prefer enum types to readResolve
1. The readResolve feature allows you to substitute another instance for the one created by readObject. If the class of an object being deserialized defines a readResolve method with the proper decla ...
Item 17: Design and document for inheritance or else prohibit it
1. The class must document precisely the effects of overriding any method. In other words, the class must document its self-use of overridable methods.
2. By convention, a method that invokes o ...
Item 15: Minimize mutability
1. The Java platform libraries contain many immutable classes, including String, the boxed primitive classes, and BigInteger and BigDecimal.
2. Immutable classes are easier to design, implement ...
序列化到底是怎么回事
有感:花了7年多时间才感悟到什么样才是一个真正的程序员。
“研究”了那么多“高深”的东西后才发现,原来“低级”的基础是那么重要。
面对基础,我又是那么无知。
所谓Java的序列化是指,Java对象(注意是对象、对象)可以被编码成字节码的形式(主要用于存储或传输),同时可以进行逆向的操作,“反”序列化成JVM中的对象。
当然,不是所有的Java对象都可以序列化:必须实现java.i ...