public class ProtobufUtil extends Object
Constructor and Description |
---|
ProtobufUtil() |
Modifier and Type | Method and Description |
---|---|
static <A> A |
fromByteArray(SerializationContext ctx,
byte[] bytes,
Class<A> clazz) |
static <A> A |
fromByteArray(SerializationContext ctx,
byte[] bytes,
int offset,
int length,
Class<A> clazz) |
static Object |
fromWrappedByteArray(SerializationContext ctx,
byte[] bytes)
Parses a top-level message that was wrapped according to the org.infinispan.protostream.WrappedMessage proto
definition.
|
static Object |
fromWrappedByteArray(SerializationContext ctx,
byte[] bytes,
int offset,
int length) |
static Object |
fromWrappedByteArray(SerializationContext ctx,
com.google.protobuf.CodedInputStream in) |
static SerializationContext |
newSerializationContext() |
static <A> A |
readFrom(SerializationContext ctx,
com.google.protobuf.CodedInputStream in,
Class<A> clazz) |
static <A> A |
readFrom(SerializationContext ctx,
InputStream in,
Class<A> clazz) |
static byte[] |
toByteArray(SerializationContext ctx,
Object t) |
static void |
toWrappedByteArray(SerializationContext ctx,
com.google.protobuf.CodedOutputStream out,
Object t) |
static byte[] |
toWrappedByteArray(SerializationContext ctx,
Object t) |
static <A> void |
writeTo(SerializationContext ctx,
com.google.protobuf.CodedOutputStream out,
A t) |
static void |
writeTo(SerializationContext ctx,
OutputStream out,
Object t) |
public static SerializationContext newSerializationContext()
public static <A> void writeTo(SerializationContext ctx, com.google.protobuf.CodedOutputStream out, A t) throws IOException
IOException
public static void writeTo(SerializationContext ctx, OutputStream out, Object t) throws IOException
IOException
public static byte[] toByteArray(SerializationContext ctx, Object t) throws IOException
IOException
public static <A> A readFrom(SerializationContext ctx, com.google.protobuf.CodedInputStream in, Class<A> clazz) throws IOException
IOException
public static <A> A readFrom(SerializationContext ctx, InputStream in, Class<A> clazz) throws IOException
IOException
public static <A> A fromByteArray(SerializationContext ctx, byte[] bytes, Class<A> clazz) throws IOException
IOException
public static <A> A fromByteArray(SerializationContext ctx, byte[] bytes, int offset, int length, Class<A> clazz) throws IOException
IOException
public static byte[] toWrappedByteArray(SerializationContext ctx, Object t) throws IOException
IOException
public static void toWrappedByteArray(SerializationContext ctx, com.google.protobuf.CodedOutputStream out, Object t) throws IOException
IOException
public static Object fromWrappedByteArray(SerializationContext ctx, byte[] bytes) throws IOException
ctx
- bytes
- IOException
public static Object fromWrappedByteArray(SerializationContext ctx, byte[] bytes, int offset, int length) throws IOException
IOException
public static Object fromWrappedByteArray(SerializationContext ctx, com.google.protobuf.CodedInputStream in) throws IOException
IOException
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.