public static int unmarshallSize ( ObjectInput in ) throws IOException { byte b = in . readByte ( ) ; if ( ( b & 0x80 ) != 0 ) { return NULL_VALUE ; //negative value } int i = b & 0x3F ; if ( ( b & 0x40 ) == 0 ) { return i ; } int shift = 6 ; do { b = in . readByte ( ) ; i |= ( b & 0x7F ) << shift ; shift += 7 ; } while ( ( b & 0x80 ) != 0 ) ; return i ; }
Unmarshall an integer .