Choose the decision supported by each API contract. These are local self-check questions.
Read the lessons
- Java DOM parsing: deny external XML access at the factory
- Java StAX: pull XML events under a count and entity policy
- Java XPath: compile a fixed selection, not user-supplied code
- Java XML Schema validation: use a trusted schema without external fetches
- Java XML Transformer: bound serialized output and external access
- Java XML namespaces: select by URI and local name
- Java GZIPInputStream: cap bytes after decompression
- Java GZIPOutputStream: close before using the compressed bytes
- Java ZipFile entries: reject duplicate names before selection
- Java ZIP CRC32: detect corruption without claiming authenticity
- Java ZipOutputStream: close each entry and the archive before publication
Common Mistakes
Do not treat a parser default, compressed input length, or checksum as a complete trust boundary.
