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