private void readNetscapeExt() {
        do {
            readBlock();
            if (block[0] == 1) {
                // Loop count sub-block.
                int b1 = ((int) block[1]) & 0xff;
                int b2 = ((int) block[2]) & 0xff;
                header.loopCount = (b2 << 8) | b1;
                if(header.loopCount == 0) {
                    header.loopCount = GifDecoder.LOOP_FOREVER;
                }
            }
        } while ((blockSize > 0) && !err());
    }
private void readNetscapeExt ( ) { do { readBlock ( ) ; if ( block [ 0 ] == 1 ) { int b1 = ( ( int ) block [ 1 ] ) & 0xff ; int b2 = ( ( int ) block [ 2 ] ) & 0xff ; header . loopCount = ( b2 << 8 ) | b1 ; if ( header . loopCount == 0 ) { header . loopCount = GifDecoder . LOOP_FOREVER ; } } } while ( ( blockSize > 0 ) && ! err ( ) ) ; }
Reads Netscape extension to obtain iteration count.