Package org.bardframework.commons.utils
Class SerializationUtils
- java.lang.Object
-
- org.bardframework.commons.utils.SerializationUtils
-
public final class SerializationUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tdeserialize(byte[] inBytes)static <T> Tdeserialize(InputStream inputStream)static <T> TdeserializeAndCheckObject(byte[] object, Class<? extends Serializable> type)static byte[]serialize(Serializable object)static voidserialize(Serializable object, OutputStream outputStream)static byte[]serializeAndEncodeObject(Serializable obj)
-
-
-
Method Detail
-
serialize
public static byte[] serialize(Serializable object) throws IOException
- Throws:
IOException
-
serialize
public static void serialize(Serializable object, OutputStream outputStream) throws IOException
- Throws:
IOException
-
deserialize
public static <T> T deserialize(byte[] inBytes) throws IOException, ClassNotFoundException- Throws:
IOExceptionClassNotFoundException
-
deserialize
public static <T> T deserialize(InputStream inputStream) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
serializeAndEncodeObject
public static byte[] serializeAndEncodeObject(Serializable obj) throws IOException
- Throws:
IOException
-
deserializeAndCheckObject
public static <T> T deserializeAndCheckObject(byte[] object, Class<? extends Serializable> type) throws IOException, ClassNotFoundException- Throws:
IOExceptionClassNotFoundException
-
-