comparison servlet/src/digilib/io/FileOps.java @ 821:6c752969f9e8 stream

more tries and catches...
author robcast
date Tue, 22 Feb 2011 20:08:27 +0100
parents 7357ad8f9f42
children
comparison
equal deleted inserted replaced
820:dc8cda290f2f 821:6c752969f9e8
105 105
106 /** 106 /**
107 * get the mime type for a file format (by extension) 107 * get the mime type for a file format (by extension)
108 */ 108 */
109 public static String mimeForFile(File f) { 109 public static String mimeForFile(File f) {
110 return (String) fileTypes.get(extname(f.getName().toLowerCase())); 110 if (f == null) {
111 return null;
112 }
113 return fileTypes.get(extname(f.getName().toLowerCase()));
111 } 114 }
112 115
113 /** 116 /**
114 * get the file class for the filename (by extension) 117 * get the file class for the filename (by extension)
115 * 118 *