Package nbbrd.io.xml
Class Sax
java.lang.Object
nbbrd.io.xml.Sax
- Author:
- Philippe Charles
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull XMLReaderstatic @NonNull InputSourcenewInputSource(@NonNull File file) Creates a new InputSource from a file.static @NonNull InputSourcenewInputSource(@NonNull File file, @NonNull Charset encoding) Creates a new InputSource from a file.static voidpreventXXE(@NonNull XMLReader reader) Prevents XXE vulnerability by disabling features.static @NonNull IOExceptiontoIOException(@NonNull SAXException ex)
-
Constructor Details
-
Sax
public Sax()
-
-
Method Details
-
preventXXE
Prevents XXE vulnerability by disabling features.- Parameters:
reader- non-null reader- See Also:
-
createReader
- Throws:
IOException
-
newInputSource
Creates a new InputSource from a file.- Parameters:
file- a non-null file- Returns:
- a new InputSource
- See Also:
-
newInputSource
Creates a new InputSource from a file.- Parameters:
file- a non-null fileencoding- a non-null encoding- Returns:
- a new InputSource
- See Also:
-
toIOException
-