code: 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);
      }
docs: Reads header of a map.
  
  <p>
  This method returns number of pairs to be read. After this method call, for each pair, you call unpacker
  methods for key first, and then value. You will call unpacker methods twice as many time as the returned
  count. You don't have to call anything at the end of iteration.
  
  @return the size of the map to be read
  @throws MessageTypeException when value is not MessagePack Map type
  @throws MessageSizeException when size of the map is larger than 2^31 - 1
  @throws IOException when underlying input throws IOException