public class MimeTypes extends Object
There are various solutions built into Java that depend on extra resource and configuration files. They are designed to be composable and extensible, but also unfortunately tricky to control. This is meant to be a simple solution that may eventually be subsumed by a better one.
|Modifier and Type||Method and Description|
Gets the default MIME type, which is
Gets the MIME type for the file with the given extension.
Gets the MIME type for the file with the given name, by extension.
fileExtension- The file extension.
null, if the file extension is not recognized.
getMimeTypeForExtension(String)to determine the MIME type. If the extension cannot be determined, or the extension is unrecognized, this method return
fileName- The file name.
null, if the file's extension is not recognized.
public static String getDefaultMimeType()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.