It is assumed that classes in the "java.lang" and "java.util" packages are always authorized.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final String[] | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| private void | |
| private boolean | |
| protected Class | resolveClass(ObjectStreamClass
an instance of class anObjectStreamClass)ObjectStreamClassOverrides java. |
| ARRAY_LIMIT | back to summary |
|---|---|
| private static final int ARRAY_LIMIT | |
| DEPTH_LIMIT | back to summary |
|---|---|
| private static final int DEPTH_LIMIT | |
| JAVA_PACKAGES | back to summary |
|---|---|
| private static final String[] JAVA_PACKAGES | |
| whitelistedClassNames | back to summary |
|---|---|
| private final List<String> whitelistedClassNames | |
| HardenedObjectInputStream | back to summary |
|---|---|
| public HardenedObjectInputStream(InputStream in, String[] whitelist) throws IOException | |
| HardenedObjectInputStream | back to summary |
|---|---|
| public HardenedObjectInputStream(InputStream in, List<String> whitelist) throws IOException | |
| addToWhitelist | back to summary |
|---|---|
| protected void addToWhitelist(List<String> additionalAuthorizedClasses) | |
| initObjectFilter | back to summary |
|---|---|
| private void initObjectFilter() | |
| isWhitelisted | back to summary |
|---|---|
| private boolean isWhitelisted(String incomingClassName) | |
| 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.
| |