Class ProtoHead
java.lang.Object
com.github.tobato.fastdfs.domain.proto.ProtoHead
FDFS协议头定义
FDFS协议头一共10位
- Author:
- tobato
-
Constructor Details
-
ProtoHead
public ProtoHead(byte cmd) 请求报文构造函数 -
ProtoHead
public ProtoHead(long contentLength, byte cmd, byte status) 返回报文构造函数- Parameters:
contentLength- 报文内容长度cmd- 报文类型status- 处理状态
-
-
Method Details
-
createFromInputStream
读取输入流创建报文头- Parameters:
ins- 文件流- Returns:
- FDFS协议头定义
- Throws:
IOException- 异常
-
toByte
public byte[] toByte()toByte- Returns:
- 字节
-
validateResponseHead
验证服务端返回报文有效性- Returns:
- 有效性
- Throws:
IOException- 异常
-
toString
-