- java.lang.Object
-
- com.github.weisj.jsvg.util.ResourceUtil
-
public final class ResourceUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerLOGGERprivate static java.util.Set<java.lang.String>SUPPORTED_MIME_TYPES
-
Constructor Summary
Constructors Modifier Constructor Description privateResourceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanisSupportedMimeType(@NotNull java.lang.String mimeType)static @Nullable RenderableResourceloadImage(@NotNull DomDocument document, @NotNull java.net.URI uri)private static @Nullable java.awt.image.BufferedImageloadToBufferedImage(@NotNull java.net.URI uri)private static @Nullable java.awt.image.BufferedImagereadPossiblyCorruptedFile(@NotNull java.io.InputStream inputStream)
-
-
-
Method Detail
-
loadImage
@Nullable public static @Nullable RenderableResource loadImage(@NotNull @NotNull DomDocument document, @NotNull @NotNull java.net.URI uri) throws java.io.IOException
- Throws:
java.io.IOException
-
loadToBufferedImage
@Nullable private static @Nullable java.awt.image.BufferedImage loadToBufferedImage(@NotNull @NotNull java.net.URI uri) throws java.io.IOException- Throws:
java.io.IOException
-
isSupportedMimeType
private static boolean isSupportedMimeType(@NotNull @NotNull java.lang.String mimeType)
-
readPossiblyCorruptedFile
@Nullable private static @Nullable java.awt.image.BufferedImage readPossiblyCorruptedFile(@NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException- Throws:
java.io.IOException
-
-