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

推荐订阅源

T
The Blog of Author Tim Ferriss
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
有赞技术团队
有赞技术团队
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园_首页
Y
Y Combinator Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
雷峰网
雷峰网
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
P
Proofpoint News Feed
B
Blog
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 淡无心

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));