本文整理了Java中org.openide.filesystems.FileUtil.getMIMETypeExtensions()
方法的一些代码示例,展示了FileUtil.getMIMETypeExtensions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtil.getMIMETypeExtensions()
方法的具体详情如下:
包路径:org.openide.filesystems.FileUtil
类名称:FileUtil
方法名:getMIMETypeExtensions
[英]Returns list of file extensions associated with specified MIME type. In other words files with those extensions are recognized as specified MIME type in NetBeans' filesystem. It never returns null.
[中]返回与指定MIME类型关联的文件扩展名列表。换句话说,具有这些扩展名的文件在NetBeans的文件系统中被识别为指定的MIME类型。它从不返回null。
代码示例来源:origin: org.netbeans.api/org-openide-filesystems
/**
* Add all extensions assigned to a MIME Type to the extension list.
*/
private static void addMimeTypeExts(List<FilterElement> exts, String type) {
addAllExtensionsToList(exts, FileUtil.getMIMETypeExtensions(type));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-utils
private MIMEExtensions(String mimeType, String description) {
this.mimeType = mimeType;
this.description = description;
exts = new TreeSet<String>();
exts.addAll(FileUtil.getMIMETypeExtensions(mimeType));
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-css-prep
public Collection<String> getFileExtensions() {
Set<String> extensions = new HashSet<>();
for (String mimeType : getMimeTypes()) {
extensions.addAll(FileUtil.getMIMETypeExtensions(mimeType));
}
return extensions;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-utils
public static boolean isRegistered(String mimeType, String ext) {
if (ext == null || ext.length() == 0) {
return false;
}
// try cache
MIMEExtensions out = get(mimeType);
if (out == null) {
return FileUtil.getMIMETypeExtensions(mimeType).contains(ext);
} else {
return out.contains(ext);
}
}
/**
内容来源于网络,如有侵权,请联系作者删除!