code: @SuppressWarnings("unchecked")
    @Override
    public void readFields(DataInput in) throws IOException {
      super.readFields(in);
      
      // Read the number of entries in the map
      
      int entries = in.readInt();
      
      // Then read each key/value pair
      
      for (int i = 0; i < entries; i++) {
        WritableComparable key =
          (WritableComparable) ReflectionUtils.newInstance(getClass(
              in.readByte()), getConf());
        
        key.readFields(in);
        
        Writable value = (Writable) ReflectionUtils.newInstance(getClass(
            in.readByte()), getConf());
        
        value.readFields(in);
        instance.put(key, value);
      }
    }
docs: {@inheritDoc}