|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.ndr.toolkit.MimeTypes
public class MimeTypes
Singleton utility class to determine the mime-type of a file based on its extension.
Usage:
Method Summary | |
---|---|
static MimeTypes |
getInstance()
Gets the instance attribute of the MimeTypes class |
String |
getMimeType(File file)
Gets the mimeType associated with the provided file (based on the file's name). |
String |
getMimeType(String filename)
Gets the mimeType for the provided filename. |
static void |
main(String[] args)
The main program for the MimeTypes class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MimeTypes getInstance()
public String getMimeType(String filename)
filename
- a string having an extention ("name.ext").
public String getMimeType(File file)
file
- file named with a dot extension.
public static void main(String[] args) throws Exception
args
- The command line arguments
Exception
- NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |