All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codingapi.tx.framework.utils.serializer.ISerializer Maven / Gradle / Ivy


package com.codingapi.tx.framework.utils.serializer;


import com.lorne.core.framework.exception.SerializerException;

/**
 * @author lorne 2017/11/11
 */
public interface ISerializer {
    /**
     * 序列化对象
     *
     * @param obj 需要序更列化的对象
     * @return byte []  序列号结果
     * @throws SerializerException  序列化异常
     */
    byte[] serialize(Object obj) throws SerializerException;


    /**
     * 反序列化对象
     *
     * @param param 需要反序列化的byte []
     * @param clazz 反序列化成为的bean对象Class
     * @param    反序列化成为的bean对象
     * @return  对象
     * @throws SerializerException  序列化异常
     */

     T deSerialize(byte[] param, Class clazz) throws SerializerException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy