|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.activation.FileTypeMap
ch.randelshofer.activation.RecognizerFileTypeMap
public class RecognizerFileTypeMap
This file data source uses a Recognizer to determine the content type of the file.
| Constructor Summary | |
|---|---|
RecognizerFileTypeMap()
Creates a new instance No Recognizer will be used to determine the content type of the file (#getContentType will always return 'application/octet-stream'. |
|
RecognizerFileTypeMap(Recognizer detector)
Creates a new instance. |
|
| Method Summary | |
|---|---|
java.lang.String |
getContentType(java.io.File file)
Return the base MIME Type of this data. |
java.lang.String |
getContentType(java.lang.String filename)
Return the base MIME Type of this data. |
Recognizer |
getRecognizer()
Returns the Recognizer that will be used for determining the content type of the file. |
void |
setRecognizer(Recognizer detector)
Sets the Recognizer that will be used for determining the content type of the file. |
| Methods inherited from class javax.activation.FileTypeMap |
|---|
getDefaultFileTypeMap, setDefaultFileTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecognizerFileTypeMap()
public RecognizerFileTypeMap(Recognizer detector)
| Method Detail |
|---|
public void setRecognizer(Recognizer detector)
public Recognizer getRecognizer()
public java.lang.String getContentType(java.io.File file)
getContentType in class javax.activation.FileTypeMappublic java.lang.String getContentType(java.lang.String filename)
getContentType in class javax.activation.FileTypeMap
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||