public final class SerializationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkWhiteList(Class<?> clazz,
Set<String> whiteListPatterns)
Verify that the class is in the white list.
|
static Object |
deserialize(byte[] bytes)
Deserialize the bytes.
|
static Object |
deserialize(InputStream inputStream,
Set<String> whiteListPatterns,
ClassLoader classLoader)
Deserialize the stream.
|
static Object |
deserialize(ObjectInputStream stream)
Deserialize the stream.
|
static byte[] |
serialize(Object object)
Serialize the object provided.
|
public static byte[] serialize(Object object)
object
- the object to serializepublic static Object deserialize(byte[] bytes)
bytes
- a serialized object createdpublic static Object deserialize(ObjectInputStream stream)
stream
- an object stream created from a serialized objectpublic static Object deserialize(InputStream inputStream, Set<String> whiteListPatterns, ClassLoader classLoader) throws IOException
inputStream
- the stream.whiteListPatterns
- allowed classes.classLoader
- the class loader.IOException
- IO Exception.