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