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

com.github.xingshuangs.iot.protocol.common.serializer.IByteArraySerializable Maven / Gradle / Ivy

package com.github.xingshuangs.iot.protocol.common.serializer;


/**
 * 字节数组的序列化接口
 *
 * @author xingshuang
 */
public interface IByteArraySerializable {

    /**
     * 读数据
     *
     * @param targetClass 目标类
     * @param src         字节数组
     * @param          类型
     * @return 类型对象
     */
     T toObject(Class targetClass, byte[] src);

    /**
     * 写数据
     *
     * @param targetBean 目标对象
     * @param         类型
     * @return 字节数组
     */
     byte[] toByteArray(T targetBean);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy