code: public static <T> T convert(InputStream in, Class<T> klass) {
          Map<String, Object> map;
          String raw;
          try {
              // fix:
              // DocumentBuilder不支持直接传入Reader,如果直接传InputStream的话又按系统默认编码,所以,用InputSource中转一下
              Reader r = Streams.utf8r(in);
              raw = Lang.readAll(r);
              map = Xmls.asMap(xmls()
                                   .parse(new InputSource(new StringReader(raw)))
                                   .getDocumentElement());
          }
          catch (Exception e) {
              throw Lang.wrapThrow(e);
          }
          Lang.convertMapKey(map, new MapKeyConvertor() {
              @Override
              public String convertKey(String key) {
                  return Strings.lowerFirst(key);
              }
          }, true);
  
          if (DEV_MODE) {
              log.debug("Income >> \n" + Json.toJson(map));
          }
          T t = Lang.map2Object(map, klass);
          if (t instanceof WxInMsg)
              ((WxInMsg) t).raw(raw);
          else if (t instanceof WxOutMsg)
              ((WxOutMsg) t).raw(raw);
          return t;
      }
docs: 将一个输入流转为WxInMsg