jefft 2003/06/19 04:17:20
Modified: src/java/org/apache/cocoon/util MIMEUtils.java
Log:
Some cleanups
Revision Changes Path
1.5 +5 -7 cocoon-2.1/src/java/org/apache/cocoon/util/MIMEUtils.java
Index: MIMEUtils.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/util/MIMEUtils.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MIMEUtils.java 1 Jun 2003 09:17:00 -0000 1.4
+++ MIMEUtils.java 19 Jun 2003 11:17:20 -0000 1.5
@@ -74,8 +74,7 @@
*/
public class MIMEUtils {
- /** Our properties are now here: */
- private static final String PROPS_FILE = "org/apache/cocoon/util/mime.types";
+ private static final String MIME_MAPPING_FILE =
"org/apache/cocoon/util/mime.types";
/** Default extensions for MIME types. */
final private static Map extMap = new HashMap();
@@ -87,13 +86,13 @@
*/
static {
try {
- final InputStream is =
MIMEUtils.class.getClassLoader().getResourceAsStream(PROPS_FILE);
+ final InputStream is =
MIMEUtils.class.getClassLoader().getResourceAsStream(MIME_MAPPING_FILE);
if ( null == is ) {
- throw new RuntimeException("Cocoon cannot load MIME type mappings
from " + PROPS_FILE);
+ throw new RuntimeException("Cocoon cannot load MIME type mappings
from " + MIME_MAPPING_FILE);
}
loadMimeTypes(new InputStreamReader(is), extMap, mimeMap);
} catch (IOException ioe) {
- throw new RuntimeException("Cocoon cannot load MIME type mappings from
" + PROPS_FILE);
+ throw new RuntimeException("Cocoon cannot load MIME type mappings from
" + MIME_MAPPING_FILE);
}
}
@@ -107,7 +106,6 @@
public static String getMIMEType(final File file)
throws FileNotFoundException, IOException {
BufferedInputStream in = null;
- System.out.println("****** "+file);
try {
in = new BufferedInputStream(new FileInputStream(file));