public class ProtobufUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ProtobufUtils.MessageType |
| Constructor and Description |
|---|
ProtobufUtils() |
| Modifier and Type | Method and Description |
|---|---|
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 © 2020 Baidu, Inc.. All rights reserved.