| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<MimeTypeMapper>
org.cert.cc.jira.email.MimeTypeMapper
public enum MimeTypeMapper
 MimeTypeMapper returns the correct MIME type based on a filename. If one cannot be determied, 
 application/octet-stream will be returned. The mime.types file is read in
 from the classpath. JIRA has an extensive mime.types already included in its classpath. If
 the mime.types is not in the classpath, /etc/mime.types is used. If any errors
 occur while reading in the mime.types file, a default instance of MimetypesFileTypeMap is 
 used. The /etc/mime.types file is only read in once.
 
© 2010 Carnegie Mellon University
MimetypesFileTypeMap| Enum Constant Summary | |
|---|---|
| INSTANCE | |
| Method Summary | |
|---|---|
| static MimeTypeMapper | getInstance()Single access point | 
|  String | getType(String filename)Calculates and returns the MIME type. | 
| static MimeTypeMapper | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static MimeTypeMapper[] | values()Returns an array containing the constants of this enum type, in the order they are declared. | 
| Methods inherited from class java.lang.Enum | 
|---|
| clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf | 
| Methods inherited from class java.lang.Object | 
|---|
| getClass, notify, notifyAll, wait, wait, wait | 
| Enum Constant Detail | 
|---|
public static final MimeTypeMapper INSTANCE
| Method Detail | 
|---|
public static MimeTypeMapper[] values()
for (MimeTypeMapper c : MimeTypeMapper.values()) System.out.println(c);
public static MimeTypeMapper valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static MimeTypeMapper getInstance()
public String getType(String filename)
filename - Filename to be checked
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||