Class CamelObjectInputStream

java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
org.apache.camel.support.CamelObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable

public class CamelObjectInputStream extends ObjectInputStream
An ObjectInputStream that resolves classes against the Camel application classloader and installs a JEP-290 ObjectInputFilter while reading, as a defense-in-depth measure against unsafe deserialization.

As this is the shared stream used by Camel deserialization consumers, the filter is applied by default so that every caller inherits it. When no explicit pattern is supplied the JVM-wide jdk.serialFilter is honoured if set, otherwise DeserializationFilterHelper.DEFAULT_DESERIALIZATION_FILTER is applied.