public static void setDefaultFileTypeMap(FileTypeMap map) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
// if it's ok with the SecurityManager, it's ok with me...
security.checkSetFactory();
} catch (SecurityException ex) {
// otherwise, we also allow it if this code and the
// factory come from the same class loader (e.g.,
// the JAF classes were loaded with the applet classes).
if (FileTypeMap.class.getClassLoader() !=
map.getClass().getClassLoader())
throw ex;
}
}
defaultMap = map;
}
Sets the default FileTypeMap for the system. This instance
will be returned to callers of getDefaultFileTypeMap. |