Examples of GaeaInStream


Examples of com.bj58.spat.gaea.serializer.component.GaeaInStream

      /*
     * @return  对象序列化后的字节数组
     * @param   obj     要序列化的对象
     */
    public Object Derialize(byte[] buffer, Class type) throws Exception {
        GaeaInStream stream = null;
        try {
            stream = new GaeaInStream(buffer);
            stream.Encoder = _Encoder;
            if (ClassHelper.InterfaceOf(type, IGaeaSerializer.class)) {
                IGaeaSerializer obj = (IGaeaSerializer) type.newInstance();
                obj.Derialize(stream);
                return obj;
            }
            return SerializerFactory.GetSerializer(type).ReadObject(stream, type);
        } finally {
            if (stream != null) {
                stream.close();
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.