Class AbstractImagePreloader

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected byte[] getHeader​(javax.imageio.stream.ImageInputStream in, int size)
      Allows to read an image header (usually just a magic number).
      int getPriority()
      Returns the priority of the preloader.
      • Methods inherited from class java.lang.Object

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

      • AbstractImagePreloader

        public AbstractImagePreloader()
    • Method Detail

      • getHeader

        protected byte[] getHeader​(javax.imageio.stream.ImageInputStream in,
                                   int size)
                            throws java.io.IOException
        Allows to read an image header (usually just a magic number). The InputStream is reset to the position before the header was read.
        Parameters:
        in - the ImageInputStream to read from
        size - the size of the header
        Returns:
        the loaded header
        Throws:
        java.io.IOException - if an I/O error occurs while reading the header
      • getPriority

        public int getPriority()
        Returns the priority of the preloader. The lower the value, the higher the preloader's priority.
        Specified by:
        getPriority in interface ImagePreloader
        Returns:
        an integer (default is 1000)