Class AbstractImagePreloader

    • Constructor Detail

      • AbstractImagePreloader

        public AbstractImagePreloader()
    • Method Detail

      • getHeader

        protected byte[] getHeader​(ImageInputStream in,
                                   int size)
                            throws 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:
        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)