public final class ProtobufUtil extends Object
Constructor and Description |
---|
ProtobufUtil() |
public static SerializationContext newSerializationContext(Configuration configuration)
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 ByteBuffer toByteBuffer(SerializationContext ctx, Object t) 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 <A> A fromByteBuffer(SerializationContext ctx, ByteBuffer byteBuffer, Class<A> clazz) 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 fromWrappedByteBuffer(SerializationContext ctx, ByteBuffer byteBuffer) throws IOException
IOException
public static byte[] toWrappedByteArray(SerializationContext ctx, Object t) throws IOException
IOException
public static ByteBuffer toWrappedByteBuffer(SerializationContext ctx, Object t) throws IOException
IOException
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.