Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • SUPPORTED_MIME_TYPES

        private static final java.util.Set<java.lang.String> SUPPORTED_MIME_TYPES
    • Constructor Detail

      • ResourceUtil

        private ResourceUtil()
    • 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