Package com.github.weisj.jsvg.parser
Class SVGLoader
java.lang.Object
com.github.weisj.jsvg.parser.SVGLoader
Class for loading svg files as an
SVGDocument
.
Note that this class isn't guaranteed to be thread safe and hence shouldn't be used across multiple threads.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StaxSVGLoader
(package private) static final Logger
private static final @NotNull NodeSupplier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static @Nullable InputStream
createDocumentInputStream
(@NotNull InputStream is) @Nullable SVGDocument
load
(@NotNull InputStream inputStream) Deprecated.@Nullable SVGDocument
load
(@NotNull InputStream inputStream, @NotNull ParserProvider parserProvider) Deprecated.useload(InputStream, URI, LoaderContext)
instead@Nullable SVGDocument
load
(@NotNull InputStream inputStream, @NotNull ParserProvider parserProvider, @NotNull ResourceLoader resourceLoader) Deprecated.useload(InputStream, URI, LoaderContext)
instead@Nullable SVGDocument
load
(@NotNull InputStream inputStream, @Nullable URI xmlBase, @NotNull LoaderContext loaderContext) Load an SVG document from the given input stream.@Nullable SVGDocument
@Nullable SVGDocument
load
(@NotNull URL xmlBase, @NotNull LoaderContext loaderContext) @Nullable SVGDocument
load
(@NotNull URL xmlBase, @NotNull ParserProvider parserProvider) (package private) StaxSVGLoader
loader()
-
Field Details
-
LOGGER
-
NODE_SUPPLIER
-
loader
-
-
Constructor Details
-
SVGLoader
public SVGLoader()
-
-
Method Details
-
load
-
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull URL xmlBase, @NotNull @NotNull ParserProvider parserProvider) -
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull URL xmlBase, @NotNull @NotNull LoaderContext loaderContext) -
load
Deprecated.useload(InputStream, URI, LoaderContext)
instead -
load
@Deprecated @Nullable public @Nullable SVGDocument load(@NotNull @NotNull InputStream inputStream, @NotNull @NotNull ParserProvider parserProvider) Deprecated.useload(InputStream, URI, LoaderContext)
instead -
load
@Deprecated @Nullable public @Nullable SVGDocument load(@NotNull @NotNull InputStream inputStream, @NotNull @NotNull ParserProvider parserProvider, @NotNull @NotNull ResourceLoader resourceLoader) Deprecated.useload(InputStream, URI, LoaderContext)
instead -
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull InputStream inputStream, @Nullable @Nullable URI xmlBase, @NotNull @NotNull LoaderContext loaderContext) Load an SVG document from the given input stream.- Parameters:
inputStream
- the input stream to read the SVG document fromxmlBase
- The uri of the document. This is used to resolve external documents (if enabled).loaderContext
- The loader context to use for loading the document.- Returns:
- The loaded SVG document or null if an error occurred.
-
loader
-
createDocumentInputStream
-
load(InputStream, URI, LoaderContext)
instead