类 ProtoHead

java.lang.Object
com.github.tobato.fastdfs.domain.proto.ProtoHead

public class ProtoHead extends Object
FDFS协议头定义

 FDFS协议头一共10位
 
作者:
tobato
  • 构造器详细资料

    • ProtoHead

      public ProtoHead(byte cmd)
      请求报文构造函数
    • ProtoHead

      public ProtoHead(long contentLength, byte cmd, byte status)
      返回报文构造函数
      参数:
      contentLength -
      cmd -
      status -
  • 方法详细资料

    • getContentLength

      public long getContentLength()
    • getCmd

      public byte getCmd()
    • getStatus

      public byte getStatus()
    • toByte

      public byte[] toByte()
      toByte
      返回:
    • createFromInputStream

      public static ProtoHead createFromInputStream(InputStream ins) throws IOException
      读取输入流创建报文头
      参数:
      ins -
      返回:
      抛出:
      IOException
    • validateResponseHead

      public boolean validateResponseHead() throws IOException
      验证服务端返回报文有效性
      返回:
      抛出:
      IOException
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • setContentLength

      public void setContentLength(long contentLength)