Class SerializationUtil
java.lang.Object
org.apache.logging.log4j.util.internal.SerializationUtil
Provides methods to increase the safety of object serialization/deserialization.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertFiltered(ObjectInputStream stream) static Objectstatic StringstripArray(Class<?> clazz) Gets the class name of an array component recursively.static StringstripArray(String name) Gets the class name of an array component recursively.static voidwriteWrappedObject(Serializable obj, ObjectOutputStream out)
-
Field Details
-
REQUIRED_JAVA_CLASSES
-
REQUIRED_JAVA_PACKAGES
-
-
Method Details
-
writeWrappedObject
- Throws:
IOException
-
readWrappedObject
public static Object readWrappedObject(ObjectInputStream in) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
assertFiltered
-
stripArray
Gets the class name of an array component recursively.If
clazzis not an array class its name is returned.- Parameters:
clazz- the binary name of a class.
-
stripArray
Gets the class name of an array component recursively.If
nameis not the name of an array class it is returned unchanged.- Parameters:
name- the name of a class.- See Also:
-