FST Java 快速序列化库开源项目

我要开发同款
匿名用户2014年02月11日
87阅读

技术信息

开源地址
https://gitee.com/mirrors/fst
授权协议
Apache

作品详情

FSTfast-serializatio是重新实现的Java快速对象序列化的开发包。序列化速度更快(2-10倍)、体积更小,而且兼容JDK原生的序列化。要求JDK1.7支持。

Mave:

<depedecy>    <groupId>de.ruedigermoeller</groupId>    <artifactId>fst</artifactId>    <versio>1.58</versio></depedecy>

示例代码:

// ! reuse this Object, it caches metadata. Performace degrades massively// if you create a ew Cofiguratio Object with each serializatio !static FSTCofiguratio cof = FSTCofiguratio.createDefaultCofiguratio();...public MyClass myreadMethod(IputStream stream) throws IOExceptio, ClassNotFoudExceptio{    FSTObjectIput i = cof.getObjectIput(stream);    MyClass result = i.readObject(MyClass.class);    // DON'T: i.close(); here prevets reuse ad will result i a exceptio          stream.close();    retur result;}public void mywriteMethod( OutputStream stream, MyClass toWrite ) throws IOExceptio {    FSTObjectOutput out = cof.getObjectOutput(stream);    out.writeObject( toWrite, MyClass.class );    // DON'T out.close() whe usig factory method;    out.flush();    stream.close();}

功能介绍

FST fast-serialization 是重新实现的 Java 快速对象序列化的开发包。序列化速度更快(2-10倍)、体积更小,而且兼容 JDK 原生的序列化。要求 JDK 1.7 支持。...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论