//* byte[1] keepData 保留区
buf.skipBytes(1);
//* byte[3] contentLength 内容大小
buf.skipBytes(3);//.readUnsignedMedium()
//
ResponseSocketBlock res = new ResponseSocketBlock();
res.setVersion(version);
res.setRequestID(requestID);
//* --------------------------------------------------------bytes =8
//* byte[2] status 响应状态
res.setStatus(buf.readShort());
//* byte[2] serializeType-(attr-index) 序列化策略
res.setSerializeType(buf.readShort());
//* byte[2] returnType-(attr-index) 返回类型
res.setReturnType(buf.readShort());
//* byte[2] returnData-(attr-index) 返回数据
res.setReturnData(buf.readShort());
//* --------------------------------------------------------bytes =1 ~ 1021
//* byte[1] optionCount 选项参数总数
byte optionCount = buf.readByte();
for (int i = 0; i < optionCount; i++) {
//* byte[4] attr-0-(attr-index,attr-index) 选项参数
int mergeData = buf.readInt();
res.addOption(mergeData);
}
//* --------------------------------------------------------bytes =6 ~ 8192
//* byte[2] attrPool-size (Max = 2047) 池大小
short attrPoolSize = buf.readShort();
for (int i = 0; i < attrPoolSize; i++) {
//* byte[4] att-length 属性1大小
int length = buf.readInt();
res.addPoolData(length);
}
//* --------------------------------------------------------bytes =n
//* dataBody 数据内容
res.fillFrom(buf.readBytes(res.getPoolSize()));
return res;
}