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 ; }
Parse the given input source and return the media list .