private RpcEnvelope.Request readRpcEnvelope(ServletInputStream in) throws Exception {
byte chunkSize[] = new byte[4];
in.read(chunkSize);
int size = Ints.fromByteArray(chunkSize);
if (size <= 0 || size > ProtobufUtil.MAX_HEADER_CHUNK_SIZE) {
String message = "Invalid header chunk size: " + size;
throw new RpcReadException(chunkSize, in, message);
}
byte headerData[] = readyFully(in, size);
RpcEnvelope.Request rpcRequest = RpcEnvelope.Request.parseFrom(headerData);
return rpcRequest;
}
ProtobufHandler.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:ja-micro
作者:
评论列表
文章目录