Process() 공개 메소드

public Process ( int i ) : void
i int
리턴 void
예제 #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;
        }
예제 #2
0
 public ICssFile GetDefaultCSS()
 {
     if (defaultCssFile == null)
     {
         Stream input = Assembly.GetExecutingAssembly().GetManifestResourceStream("iTextSharp.tool.xml.css.default.css");
         if (input != null)
         {
             CssFileProcessor cssFileProcessor = new CssFileProcessor();
             int i = -1;
             try
             {
                 while (-1 != (i = input.ReadByte())) {
                     cssFileProcessor.Process((char)i);
                 }
                 defaultCssFile = new CSSFileWrapper(cssFileProcessor.GetCss(), true);
             }
             catch (IOException e)
             {
                 throw new RuntimeWorkerException(e);
             }
             finally 
             {
                 try
                 {
                     input.Close();
                 }
                 catch (IOException e)
                 {
                     throw new RuntimeWorkerException(e);
                 }
             }
         }
     }
     return defaultCssFile;
 }