Class Icons


  • class Icons
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int countOfIcons  
      private IcoHeader header  
      private java.util.List<java.awt.image.BufferedImage> images  
    • Constructor Summary

      Constructors 
      Constructor Description
      Icons​(javax.imageio.stream.ImageInputStream src)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void checkIndex​(int imageIndex)  
      private void fixSizesInHeader​(IcoHeaderEntry e, java.awt.image.BufferedImage image)  
      (package private) int getHeight​(int imageIndex)  
      (package private) java.awt.image.BufferedImage getImage​(int imageIndex)  
      (package private) java.util.List<java.awt.image.BufferedImage> getImages()  
      (package private) int getNumImages()  
      (package private) int getWidth​(int imageIndex)  
      private java.awt.image.BufferedImage parse​(byte[] img, IcoHeaderEntry e)  
      private byte[] prefixByFakeHeader​(byte[] origArray, IcoHeaderEntry e)  
      private int read2Bytes​(byte[] array, int offset)  
      private int read4Bytes​(byte[] array, int offset)  
      private java.awt.image.BufferedImage readImage​(IcoHeaderEntry e, javax.imageio.stream.ImageInputStream src1)  
      • Methods inherited from class java.lang.Object

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

      • countOfIcons

        private final int countOfIcons
      • images

        private final java.util.List<java.awt.image.BufferedImage> images
    • Constructor Detail

      • Icons

        Icons​(javax.imageio.stream.ImageInputStream src)
        throws java.io.IOException,
              IcoException
        Throws:
        java.io.IOException
        IcoException
    • Method Detail

      • getImage

        java.awt.image.BufferedImage getImage​(int imageIndex)
      • getImages

        java.util.List<java.awt.image.BufferedImage> getImages()
      • getNumImages

        int getNumImages()
      • checkIndex

        private void checkIndex​(int imageIndex)
      • getWidth

        int getWidth​(int imageIndex)
      • getHeight

        int getHeight​(int imageIndex)
      • readImage

        private java.awt.image.BufferedImage readImage​(IcoHeaderEntry e,
                                                       javax.imageio.stream.ImageInputStream src1)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • parse

        private java.awt.image.BufferedImage parse​(byte[] img,
                                                   IcoHeaderEntry e)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • fixSizesInHeader

        private void fixSizesInHeader​(IcoHeaderEntry e,
                                      java.awt.image.BufferedImage image)
      • prefixByFakeHeader

        private byte[] prefixByFakeHeader​(byte[] origArray,
                                          IcoHeaderEntry e)
      • read2Bytes

        private int read2Bytes​(byte[] array,
                               int offset)
      • read4Bytes

        private int read4Bytes​(byte[] array,
                               int offset)