Class GifReader


  • public class GifReader
    extends java.lang.Object
    Reader of GIF encoded data. Resources:
    • https://wiki.whatwg.org/wiki/GIF
    • https://www.w3.org/Graphics/GIF/spec-gif89a.txt
    • http://web.archive.org/web/20100929230301/http://www.etsimo.uniovi.es/gifanim/gif87a.txt
    • Field Detail

      • GIF_87A_VERSION_IDENTIFIER

        private static final java.lang.String GIF_87A_VERSION_IDENTIFIER
        See Also:
        Constant Field Values
      • GIF_89A_VERSION_IDENTIFIER

        private static final java.lang.String GIF_89A_VERSION_IDENTIFIER
        See Also:
        Constant Field Values
    • Constructor Detail

      • GifReader

        public GifReader()
    • Method Detail

      • readGifExtensionBlock

        private static void readGifExtensionBlock​(SequentialReader reader,
                                                  Metadata metadata)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readPlainTextBlock

        private static Directory readPlainTextBlock​(SequentialReader reader,
                                                    int blockSizeBytes)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • readCommentBlock

        private static GifCommentDirectory readCommentBlock​(SequentialReader reader,
                                                            int blockSizeBytes)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • readApplicationExtensionBlock

        private static void readApplicationExtensionBlock​(SequentialReader reader,
                                                          int blockSizeBytes,
                                                          Metadata metadata)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • gatherBytes

        private static byte[] gatherBytes​(SequentialReader reader)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • gatherBytes

        private static byte[] gatherBytes​(SequentialReader reader,
                                          int firstLength)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • skipBlocks

        private static void skipBlocks​(SequentialReader reader)
                                throws java.io.IOException
        Throws:
        java.io.IOException