code: public static void transform(InputStream css, OutputStream stylerSetup, boolean validate) throws ClassNotFoundException, IllegalAccessException, InstantiationException, CSSException, IOException {
        // find and use a SAC parser and document handler
        String handler = System.getProperty(DOCUMENTHANDLERPROPERTY);
        CssToBaseStylers ctbs = (CssToBaseStylers) Class.forName((handler==null)?DEFAULTDOCUMENTHANDLER:handler).newInstance();
        if (ctbs instanceof CssDocumentHandler) {
           ((CssDocumentHandler)ctbs).setMustFindStylersForCssNames(validate);
        }
        Parser cssParser = new ParserFactory().makeParser();
        cssParser.setDocumentHandler(ctbs);
        cssParser.parseStyleSheet(new InputSource(new InputStreamReader(css)));
  
        ctbs.printStylers(stylerSetup);
     }
docs: Set the system property "org.w3c.css.sac.parser" to point to your {@link Parser} and optionally {@link #DOCUMENTHANDLERPROPERTY} to
  point to your document handler.
  
  @param css
  @param stylerSetup
  @param validate when true validate css input (see {@link CssDocumentHandler#setMustFindStylersForCssNames(java.lang.Boolean) })
  @throws ClassNotFoundException
  @throws IllegalAccessException
  @throws InstantiationException
  @throws CSSException
  @throws IOException