ObjectInputStream to only allow some built-in Log4j classes and caller-specified classes to be
deserialized.
| Modifier and Type | Field and Description |
|---|---|
| private final Collection |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | FilteredObjectInputStream(final InputStream inputStream, final Collection<String> allowedExtraClasses)
|
| Modifier and Type | Method and Description |
|---|---|
| public Collection | |
| private static boolean | |
| private static boolean | |
| protected Class | resolveClass(final ObjectStreamClass
an instance of class desc)ObjectStreamClassOverrides java. Load the local class equivalent of the specified stream class description. |
| allowedExtraClasses | back to summary |
|---|---|
| private final Collection<String> allowedExtraClasses | |
| FilteredObjectInputStream | back to summary |
|---|---|
| public FilteredObjectInputStream() throws IOException, SecurityException | |
| FilteredObjectInputStream | back to summary |
|---|---|
| public FilteredObjectInputStream(final InputStream inputStream) throws IOException | |
| FilteredObjectInputStream | back to summary |
|---|---|
| public FilteredObjectInputStream(final Collection<String> allowedExtraClasses) throws IOException, SecurityException | |
| FilteredObjectInputStream | back to summary |
|---|---|
| public FilteredObjectInputStream(final InputStream inputStream, final Collection<String> allowedExtraClasses) throws IOException | |
| getAllowedClasses | back to summary |
|---|---|
| public Collection | |
| isAllowedByDefault | back to summary |
|---|---|
| private static boolean isAllowedByDefault(final String name) | |
| isRequiredPackage | back to summary |
|---|---|
| private static boolean isRequiredPackage(final String name) | |
| resolveClass | back to summary |
|---|---|
| protected Class Overrides java. Doc from java. Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in The default implementation of this method in
Class.forName(desc.getName(), false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader. If this call results in a
ClassNotFoundException and the name of the passed
ObjectStreamClass instance is the Java language keyword
for a primitive type or void, then the Class object
representing that primitive type or void will be returned
(e.g., an ObjectStreamClass with the name
"int" will be resolved to Integer.TYPE).
Otherwise, the ClassNotFoundException will be thrown to
the caller of this method.
| |