1 Star 0 Fork 259

SuperCoder/AutoLoadCache

forked from qiujiayu/AutoLoadCache 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
FSTSerializer.java 641 Bytes
一键复制 编辑 原始数据 按行查看 历史
qiujiayu 提交于 2020-03-09 23:33 +08:00 . remove @author 
package com.jarvis.cache.serializer;
import org.nustaq.serialization.FSTConfiguration;
/**
* 使用 https://github.com/RuedigerMoeller/fast-serialization 进行序列化和反序列化
*
*/
public class FSTSerializer implements ISerializer<Object> {
private static final FSTConfiguration conf=FSTConfiguration.getDefaultConfiguration();
@Override
public byte[] serialize(Object obj) throws Exception {
byte barray[]=conf.asByteArray(obj);
return barray;
}
@Override
public Object deserialize(byte[] data) throws Exception {
return conf.asObject(data);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/SuperCoderMan521/AutoLoadCache.git
git@gitee.com:SuperCoderMan521/AutoLoadCache.git
SuperCoderMan521
AutoLoadCache
AutoLoadCache
master

搜索帮助