public class ProtobufUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ProtobufUtils.MessageType |
| 构造器和说明 |
|---|
ProtobufUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ProtobufUtils.MessageType |
getMessageType(Method method) |
static com.google.protobuf.Message |
parseFrom(byte[] inputBytes,
Class clazz) |
static com.google.protobuf.Message |
parseFrom(byte[] input,
com.google.protobuf.Message defaultInstance) |
static com.google.protobuf.Message |
parseFrom(io.netty.buffer.ByteBuf input,
com.google.protobuf.Message defaultInstance)
parse proto from netty
ByteBuf |
static com.google.protobuf.Message |
parseFrom(DynamicCompositeByteBuf input,
com.google.protobuf.Message defaultInstance) |
static com.google.protobuf.Message |
parseFrom(InputStream inputStream,
Class clazz) |
public static ProtobufUtils.MessageType getMessageType(Method method)
public static com.google.protobuf.Message parseFrom(InputStream inputStream, Class clazz)
public static com.google.protobuf.Message parseFrom(byte[] inputBytes,
Class clazz)
public static com.google.protobuf.Message parseFrom(io.netty.buffer.ByteBuf input,
com.google.protobuf.Message defaultInstance)
throws IOException
ByteBufinput - netty ByteBufdefaultInstance - default instance for protoIOException - read io exceptionpublic static com.google.protobuf.Message parseFrom(byte[] input,
com.google.protobuf.Message defaultInstance)
throws IOException
IOExceptionpublic static com.google.protobuf.Message parseFrom(DynamicCompositeByteBuf input, com.google.protobuf.Message defaultInstance) throws IOException
IOExceptionCopyright © 2019 Baidu, Inc.. All rights reserved.