Warning
These utilities should be used with caution. See Secure Coding Guidelines for the Java Programming Language for details.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of the object to clone T extends Serializable> T | Returns: a clone (deep-copy) of the given objectthe object to clone object)Clone the given object using Java Object Serialization. |
| public static Object | Returns: the result of deserializing the bytesa serialized object bytes)
Deprecated
This utility uses Java Object Serialization, which allows
arbitrary code to be run and is known for being the source of many Remote
Code Execution (RCE) vulnerabilities.
Deserialize the byte array into an object. |
| public static byte[] |
| SerializationUtils | back to summary |
|---|---|
| public SerializationUtils() | |
| clone | back to summary |
|---|---|
| public static <T extends Serializable> T clone(T object) Clone the given object using Java Object Serialization.
| |
| deserialize | back to summary |
|---|---|
| public static Object deserialize(byte[] bytes)
Deprecated This utility uses Java Object Serialization, which allows arbitrary code to be run and is known for being the source of many Remote Code Execution (RCE) vulnerabilities. Prefer the use of an external tool (that serializes to JSON, XML, or any other format) which is regularly checked and updated for not allowing RCE. Deserialize the byte array into an object.
| |
| serialize | back to summary |
|---|---|
| public static byte[] serialize(Object object) Serialize the given object to a byte array. | |