public class MimeTypes
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_OCTET_STREAM
The type, 'application/octet-stream'.
|
| Constructor and Description |
|---|
MimeTypes() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getType(java.io.File file)
Gets the type for a file based on the extension.
|
static java.lang.String |
getType(java.io.File file,
java.lang.String defaultType)
Gets the type for a file based on the extension.
|
public static final java.lang.String TYPE_OCTET_STREAM
public static final java.lang.String getType(java.io.File file)
file - The file.public static final java.lang.String getType(java.io.File file,
java.lang.String defaultType)
file - The file.defaultType - The default type if undetected.