public class CmsMimeType extends java.lang.Object implements java.lang.Comparable<CmsMimeType>
构造器和说明 |
---|
CmsMimeType(java.lang.String extension,
java.lang.String type)
Default constructor for MIME types.
|
CmsMimeType(java.lang.String extension,
java.lang.String type,
boolean configured)
Special constructor for "marked" MIME types.
|
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(CmsMimeType obj)
MIME-types are compared according to the type first, and to the extension second.
|
boolean |
equals(java.lang.Object obj)
MIME-types are equal is the extension is equal.
|
java.lang.String |
getExtension()
Returns the MIME type file extension.
|
java.lang.String |
getType()
Returns the MIME type description.
|
int |
hashCode()
The hash code of MIME types is build only from the extension.
|
boolean |
isConfigured()
Returns
true if this MIME type has been read from the OpenCms configuration. |
public CmsMimeType(java.lang.String extension, java.lang.String type)
If the extension does not start with a dot '.', then a dot is automatically added as a prefix.
extension
- the MIME type extensiontype
- the MIME type descriptionpublic CmsMimeType(java.lang.String extension, java.lang.String type, boolean configured)
If the extension does not start with a dot '.', then a dot is automatically added as a prefix.
extension
- the MIME type extensiontype
- the MIME type descriptionconfigured
- indicates if this a MIME type read from the OpenCms configurationpublic int compareTo(CmsMimeType obj)
compareTo
在接口中 java.lang.Comparable<CmsMimeType>
Comparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getExtension()
public java.lang.String getType()
public int hashCode()
hashCode
在类中 java.lang.Object
Object.hashCode()
public boolean isConfigured()
true
if this MIME type has been read from the OpenCms configuration.true
if this MIME type has been read from the OpenCms configuration