惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
博客园 - 叶小钗
V
V2EX
博客园 - Franky
博客园_首页
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
S
SegmentFault 最新的问题
B
Blog RSS Feed
博客园 - 【当耐特】
D
Docker
N
Netflix TechBlog - Medium

博客园 - 淡无心

Git 常用操作命令手册 Idea快捷键 Java_core复习 gitblit重置管理员密码【gitblit】 使用命令创建git仓库 Windows平台下搭建自己的Git服务器【gitblit】 python笔记 代码整洁之道 Vue学习02 Vue学习01 linux 服务器挂在目录 java内部编码 序列化和反序列化 HttpServletResponse类 配置Tomcat服务器数据连接池 SVN修改地址 Linux初始root密码设置 plsql的使用,本地只装一个客户端。 [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
用base64Encoder进行编码 和base64Decoder解码
淡无心 · 2016-07-15 · via 博客园 - 淡无心

编码:

sun.misc.BASE64Encoder base64Encoder = new sun.misc.BASE64Encoder();

String classStr = base64Encoder.encode(classBytes.toByteArray());

解码:

byte[] classBytes = base64Decoder.decodeBuffer(classStr);

ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(classBytes));