public class SingleProtobufUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
SingleProtobufUtils.SingleMessageMarshaller<T extends com.google.protobuf.MessageLite> |
| 构造器和说明 |
|---|
SingleProtobufUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static com.google.protobuf.Message |
defaultInst(Class<?> clz) |
static <T> T |
deserialize(InputStream in,
Class<T> clz) |
static <T> com.google.protobuf.Parser<T> |
getParser(Class<T> clz) |
static <T extends com.google.protobuf.MessageLite> |
marshaller(T defaultInstance) |
static void |
serialize(Object obj,
OutputStream os) |
public static <T extends com.google.protobuf.MessageLite> void marshaller(T defaultInstance)
public static com.google.protobuf.Message defaultInst(Class<?> clz)
public static <T> com.google.protobuf.Parser<T> getParser(Class<T> clz)
public static <T> T deserialize(InputStream in, Class<T> clz) throws IOException
IOExceptionpublic static void serialize(Object obj, OutputStream os) throws IOException
IOExceptionCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.