Package com.github.weisj.jsvg.util
Class ResourceUtil
- 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.Logger
LOGGER
private static java.util.Set<java.lang.String>
SUPPORTED_MIME_TYPES
-
Constructor Summary
Constructors Modifier Constructor Description private
ResourceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static boolean
isSupportedMimeType(@NotNull java.lang.String mimeType)
static @Nullable RenderableResource
loadImage(@NotNull java.net.URI uri)
private static @Nullable java.awt.image.BufferedImage
loadToBufferedImage(@NotNull java.net.URI uri)
private static @Nullable java.awt.image.BufferedImage
readPossiblyCorruptedFile(@NotNull java.io.InputStream inputStream)
-
-
-
Method Detail
-
loadImage
@Nullable public static @Nullable RenderableResource loadImage(@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
-
-