3 * put your module comment here
13 import freemarker.template.*;
17 import javax.servlet.http.*;
18 import javax.servlet.*;
21 * Hilfsklasse zum Mergen von Template und Daten
23 public final class FileUtil {
25 private static String producerStorageRoot;
31 producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
35 * Privater Konstruktor, um versehentliche Instantiierung zu verhindern
40 public static boolean write(String filename, byte[] in)
43 boolean retVal = false;
48 f = new File(filename);
49 File dir = new File(f.getParent());
52 FileOutputStream outStream;
53 outStream = new FileOutputStream(f);
57 } catch(IOException e) {
58 throw new IOException(e.toString());
64 public static boolean read(String filename, byte out[])
68 f = new File(filename);
72 if (out.length != f.length())
74 FileInputStream inStream;
75 inStream = new FileInputStream(f);
78 } catch(IOException e) {
79 throw new IOException(e.toString());
87 public static long getSize(String filename) {
89 f = new File(filename);