@Immutable public final class SerializationHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getDeserializedObject(byte[] aData)
Convert the passed byte array to an object using deserialization.
|
static byte[] |
getSerializedByteArray(Serializable aData)
Convert the passed Serializable object to a serialized byte array.
|
@Nonnull public static byte[] getSerializedByteArray(@Nonnull Serializable aData)
aData - Source object. May not be null.null byte array.IllegalStateException - If serialization failed@Nonnull public static <T> T getDeserializedObject(@Nonnull byte[] aData)
T - The type of the deserialized objectaData - The source serialized byte array. Must contain a single object only.
May not be null.null.IllegalStateException - If deserialization failedCopyright © 2014–2020 Philip Helger. All rights reserved.