1 50 51 package org.openlaszlo.iv.flash; 52 53 import java.io.*; 54 import java.util.*; 55 56 import org.openlaszlo.iv.flash.api.*; 57 import org.openlaszlo.iv.flash.parser.*; 58 import org.openlaszlo.iv.flash.util.*; 59 import org.openlaszlo.iv.flash.context.*; 60 61 102 public final class GenUtil { 103 104 115 public static Object parse( String name ) throws IVException, FileNotFoundException { 116 return FlashFile.parse( name ); 117 } 118 119 129 public static void process( Object file, Hashtable parms ) throws IVException { 130 Context context = new StandardContext(parms); 131 ((FlashFile)file).processFile(context); 132 } 133 134 142 public static InputStream generate( Object file ) throws IVException { 143 FlashOutput fout = ((FlashFile)file).generate(); 144 return new ByteArrayInputStream(fout.getBuf(), 0, fout.getSize()); 145 } 146 147 156 public static void init( String installDir, boolean logToFile ) { 157 Util.init(installDir); 158 if( !logToFile ) { 159 Log.setLogToConsole(); 160 } 161 } 162 163 } 164 | Popular Tags |