/*
         * (non-Javadoc)
         * @see com.itextpdf.tool.xml.pipeline.css.CSSResolver#addCss(java.lang.String, java.lang.String)
         */
        public void AddCss(String content, Encoding charSet, bool isPersistent)
        {
            CssFileProcessor proc = new CssFileProcessor();

            try {
                retrieve.ProcessFromStream(new MemoryStream(charSet.GetBytes(content)), proc);
                ICssFile css = proc.GetCss();
                css.IsPersistent(isPersistent);
                this.cssFiles.Add(css);
            } catch (IOException e) {
                throw new CssResolverException(e);
            }
        }
        /**
         * Add a file to the CssFiles Collection.
         *
         * @param href the path, if it starts with http we try to retrieve the file
         *            from the net, if not we try a normal file operation.
         */
        public void AddCssFile(String href, bool isPersistent)
        {
            CssFileProcessor cssFileProcessor = new CssFileProcessor();

            try {
                retrieve.ProcessFromHref(href, cssFileProcessor);
            } catch (IOException e) {
                throw new CssResolverException(e);
            }
            ICssFile css = cssFileProcessor.GetCss();

            css.IsPersistent(isPersistent);
            this.cssFiles.Add(css);
        }