Package com.github.weisj.jsvg.parser
Class SVGLoader
- java.lang.Object
-
- com.github.weisj.jsvg.parser.SVGLoader
-
public final class SVGLoader extends java.lang.Object
Class for loading svg files as anSVGDocument
. Note that this class isn't guaranteed to be thread safe and hence shouldn't be used across multiple threads.
-
-
Field Summary
Fields Modifier and Type Field Description private StaxSVGLoader
loader
(package private) static java.util.logging.Logger
LOGGER
private static @NotNull NodeSupplier
NODE_SUPPLIER
-
Constructor Summary
Constructors Constructor Description SVGLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) static @Nullable java.io.InputStream
createDocumentInputStream(@NotNull java.io.InputStream is)
@Nullable SVGDocument
load(@NotNull java.io.InputStream inputStream)
Deprecated.useload(InputStream, URI, LoaderContext)
instead@Nullable SVGDocument
load(@NotNull java.io.InputStream inputStream, @NotNull ParserProvider parserProvider)
Deprecated.useload(InputStream, URI, LoaderContext)
instead@Nullable SVGDocument
load(@NotNull java.io.InputStream inputStream, @NotNull ParserProvider parserProvider, @NotNull ResourceLoader resourceLoader)
Deprecated.useload(InputStream, URI, LoaderContext)
instead@Nullable SVGDocument
load(@NotNull java.io.InputStream inputStream, @Nullable java.net.URI xmlBase, @NotNull LoaderContext loaderContext)
Load an SVG document from the given input stream.@Nullable SVGDocument
load(@NotNull java.net.URL xmlBase)
@Nullable SVGDocument
load(@NotNull java.net.URL xmlBase, @NotNull LoaderContext loaderContext)
@Nullable SVGDocument
load(@NotNull java.net.URL xmlBase, @NotNull ParserProvider parserProvider)
(package private) StaxSVGLoader
loader()
-
-
-
Field Detail
-
LOGGER
static final java.util.logging.Logger LOGGER
-
NODE_SUPPLIER
@NotNull private static final @NotNull NodeSupplier NODE_SUPPLIER
-
loader
private final StaxSVGLoader loader
-
-
Method Detail
-
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.net.URL xmlBase)
-
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.net.URL xmlBase, @NotNull @NotNull ParserProvider parserProvider)
-
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.net.URL xmlBase, @NotNull @NotNull LoaderContext loaderContext)
-
load
@Deprecated @Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.io.InputStream inputStream)
Deprecated.useload(InputStream, URI, LoaderContext)
instead
-
load
@Deprecated @Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull ParserProvider parserProvider)
Deprecated.useload(InputStream, URI, LoaderContext)
instead
-
load
@Deprecated @Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull ParserProvider parserProvider, @NotNull @NotNull ResourceLoader resourceLoader)
Deprecated.useload(InputStream, URI, LoaderContext)
instead
-
load
@Nullable public @Nullable SVGDocument load(@NotNull @NotNull java.io.InputStream inputStream, @Nullable @Nullable java.net.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
@Internal StaxSVGLoader loader()
-
createDocumentInputStream
@Nullable static @Nullable java.io.InputStream createDocumentInputStream(@NotNull @NotNull java.io.InputStream is)
-
-