public final class CoderHelpers
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
| static <T> T | fromByteArray(byte[] serialized,
             Coder<T> coder)Utility method for deserializing a byte array using the specified coder. | 
| static <T> byte[] | toByteArray(T value,
           Coder<T> coder)Utility method for serializing an object using the specified coder. | 
public static <T> byte[] toByteArray(T value,
                                     Coder<T> coder)
T - type of value that is serializedvalue - Value to serialize.coder - Coder to serialize with.public static <T> T fromByteArray(byte[] serialized,
                                  Coder<T> coder)
T - Type of object to be returned.serialized - bytearray to be deserialized.coder - Coder to deserialize with.