Lines Matching refs:extension
37 * Returns the file extension or an empty string iff there is no
38 * extension. This method is a convenience method for obtaining the
39 * extension of a url and has undefined results for other Strings.
41 * @return The file extension of the given url.
83 * Return the MIME type for the given extension.
84 * @param extension A file extension without the leading '.'
85 * @return The MIME type for the given extension or null iff there is none.
87 public String getMimeTypeFromExtension(String extension) {
88 return MimeUtils.guessMimeTypeFromExtension(extension);
92 private static String mimeTypeFromExtension(String extension) {
93 return MimeUtils.guessMimeTypeFromExtension(extension);
97 * Return true if the given extension has a registered MIME type.
98 * @param extension A file extension without the leading '.'
99 * @return True iff there is an extension entry in the map.
101 public boolean hasExtension(String extension) {
102 return MimeUtils.hasExtension(extension);
106 * Return the registered extension for the given MIME type. Note that some
108 * common extension for the given MIME type.
110 * @return The extension for the given MIME type or null iff there is none.
129 // the right MIME type from the file extension (if any):
142 String extension = getFileExtensionFromUrl(url);
143 String newMimeType = getMimeTypeFromExtension(extension);