Class FdfsResponse<T>

java.lang.Object
com.github.tobato.fastdfs.domain.proto.FdfsResponse<T>
Type Parameters:
T - 类型泛型
Direct Known Subclasses:
StorageDownloadResponse, StorageGetMetadataResponse, TrackerListGroupsResponse, TrackerListStoragesResponse

public abstract class FdfsResponse<T> extends Object
Fdfs交易应答基类
Author:
tobato
  • Field Details

    • genericType

      protected final Class<T> genericType
      返回值类型
  • Constructor Details

    • FdfsResponse

      public FdfsResponse()
      构造函数
  • Method Details

    • getContentLength

      protected long getContentLength()
      获取报文长度
    • decode

      public T decode(ProtoHead head, InputStream in, Charset charset) throws IOException
      解析反馈结果,head已经被解析过
      Parameters:
      head - 协议头
      in - 输入
      charset - 字符集
      Returns:
      内容
      Throws:
      IOException - 异常
    • decodeContent

      public T decodeContent(InputStream in, Charset charset) throws IOException
      解析反馈内容
      Parameters:
      in - 输入
      charset - 字符集
      Returns:
      内容
      Throws:
      IOException - 异常