Example #1
0
    	public static ICssFile GetCSS(Stream inp) {
            ICssFile cssFile = null; 
			if (null != inp) {
				CssFileProcessor cssFileProcessor = new CssFileProcessor();
                try {
                    int i = -1;
                    while (-1 != (i = inp.ReadByte())) {
                        cssFileProcessor.Process((char) i);
                    }
                    cssFile = new CSSFileWrapper(cssFileProcessor.GetCss(), true);
                } catch (IOException e) {
                    throw new RuntimeWorkerException(e);
                } finally {
                    try {
                        inp.Close();
                    } catch (IOException e) {
                        throw new RuntimeWorkerException(e);
                    }
                }
            }
            return cssFile;
        }
 virtual public void SetUp() {
     ICssFile css = new CssFileImpl();
     w = new CSSFileWrapper(css, true);
 }