question: protected void readContents ( ) { boolean done = false ; while ( ! ( done || err ( ) ) ) { int code = read ( ) ; switch ( code ) { case 0x2C : readBitmap ( ) ; break ; case 0x21 : code = read ( ) ; switch ( code ) { case 0xf9 : currentFrame = new GifFrame ( ) ; readGraphicControlExt ( ) ; break ; case 0xff : readBlock ( ) ; String app = "" ; for ( int i = 0 ; i < 11 ; i ++ ) { app += ( char ) block [ i ] ; } if ( app . equals ( "NETSCAPE2.0" ) ) { readNetscapeExt ( ) ; } else { skip ( ) ; } break ; case 0xfe : skip ( ) ; break ; case 0x01 : skip ( ) ; break ; default : skip ( ) ; } break ; case 0x3b : done = true ; break ; case 0x00 : default : status = STATUS_FORMAT_ERROR ; } } }
target:  Main file parser. Reads GIF content blocks.