public final class SerializationUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkAllowedList(java.lang.Class<?> clazz,
java.util.Set<java.lang.String> patterns)
Verify that the class is in the allowed 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> allowedListPatterns,
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> allowedListPatterns,
java.lang.ClassLoader classLoader)
throws java.io.IOException
inputStream - the stream.allowedListPatterns - allowed classes.classLoader - the class loader.java.io.IOException - IO Exception.public static void checkAllowedList(java.lang.Class<?> clazz,
java.util.Set<java.lang.String> patterns)
clazz - the class.patterns - the patterns.