question: static public int unpackInt ( DataInput is ) throws IOException { for ( int offset = 0 , result = 0 ; offset < 32 ; offset += 7 ) { int b = is . readUnsignedByte ( ) ; result |= ( b & 0x7F ) << offset ; if ( ( b & 0x80 ) == 0 ) { return result ; } } throw new Error ( "Malformed integer." ) ; }
target:  Unpack positive int value from the input stream.