code: public MediaQueryList parseMedia(final InputSource source) throws IOException {
          source_ = source;
          ReInit(getCharStream(source));
          final MediaQueryList ml = new MediaQueryList();
          try {
              mediaList(ml);
          }
          catch (final ParseException e) {
              getErrorHandler().error(toCSSParseException("invalidMediaList", e));
          }
          catch (final TokenMgrError e) {
              getErrorHandler().error(toCSSParseException(e));
          }
          catch (final CSSParseException e) {
              getErrorHandler().error(e);
          }
          return ml;
      }
docs: Parse the given input source and return the media list.
  @param source the input source
  @return new media list
  @throws IOException in case of errors