Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/FileOps.java @ 181:afe7ff98bb71
Servlet version 1.18b1
- new transfer mode "rawfile" with mime-type application/octet-stream
- finally proper logging with Log4J!
- therefore a lot of debugging-prints changed
- the Util class is now useless
- ServletOps and FileOps are now purely static
author | robcast |
---|---|
date | Fri, 21 Nov 2003 00:17:31 +0100 |
parents | 67ff8c7fecb9 |
children | 91f28e4fee8f |
comparison
equal
deleted
inserted
replaced
180:bd87f802bea1 | 181:afe7ff98bb71 |
---|---|
67 public static final int CLASS_IMAGE = 0; | 67 public static final int CLASS_IMAGE = 0; |
68 public static final int CLASS_TEXT = 1; | 68 public static final int CLASS_TEXT = 1; |
69 public static final int NUM_CLASSES = 2; | 69 public static final int NUM_CLASSES = 2; |
70 | 70 |
71 | 71 |
72 public FileOps() { | |
73 util = new Utils(); | |
74 } | |
75 | |
76 public FileOps(Utils u) { | |
77 util = u; | |
78 } | |
79 | |
80 public void setUtils(Utils u) { | |
81 util = u; | |
82 } | |
83 | |
84 /** | 72 /** |
85 * get the mime type for a file format (by extension) | 73 * get the mime type for a file format (by extension) |
86 */ | 74 */ |
87 public static String mimeForFile(File f) { | 75 public static String mimeForFile(File f) { |
88 String fn = f.getName(); | 76 String fn = f.getName(); |