This section provides comprehensive API documentation for all classes and methods in the Blocklist XStream adapter.
The API reference is organized into the following sections:
Documentation for the main BlocklistRestrictedXStream class and its core functionality:
Documentation for the security enforcement components:
BlocklistConverter - High-priority converter that blocks dangerous classesBlocklistConverterWrapper - Wraps converters with blocklist checkingPractical examples and common usage patterns:
1 2// Allowlist mode (recommended) XStream xstream = new BlocklistRestrictedXStream(); xstream.allowTypes(new Class<?>[] { MyClass.class }); // Blocklist mode (migration) XStream xstream = new BlocklistRestrictedXStream(); xstream.addPermission(AnyTypePermission.ANY);
BlocklistRestrictedXStream - Main hardened XStream implementationBlocklistConverter - Security converter that blocks dangerous classesBlocklistConverterWrapper - Wraps local converters with security checksForbiddenClassException - Thrown when blocklisted class is encounteredIllegalArgumentException - Configuration errors (e.g., trying to allow blocklisted class)UnsupportedOperationException - Blocked security-unsafe methodsThe adapter maintains full backwards compatibility with standard XStream APIs, with only intentional security restrictions:
Rate this page: