public int unpackMapHeader ( ) throws IOException { byte b = readByte ( ) ; if ( Code . isFixedMap ( b ) ) { // fixmap return b & 0x0f ; } switch ( b ) { case Code . MAP16 : { // map 16 int len = readNextLength16 ( ) ; return len ; } case Code . MAP32 : { // map 32 int len = readNextLength32 ( ) ; return len ; } } throw unexpected ( "Map" , b ) ; }
Reads header of a map .