|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.medsea.mimeutil.detector.MimeDetector
eu.medsea.mimeutil.detector.OpendesktopMimeDetector
public class OpendesktopMimeDetector
| Constructor Summary | |
|---|---|
OpendesktopMimeDetector()
|
|
OpendesktopMimeDetector(String mimeCacheFile)
|
|
| Method Summary | |
|---|---|
String |
dump()
|
String |
getDescription()
Abstract method to be implement by concrete MimeDetector(s). |
Collection |
getMimeTypesByteArray(byte[] data)
This method is unable to perform glob matching as no name is available. |
Collection |
getMimeTypesFile(File file)
This method resolves mime types closely in accordance with the RECOMENDED order of detection detailed in the Opendesktop shared mime database specification http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html See the Recommended checking order. |
Collection |
getMimeTypesInputStream(InputStream in)
This method is unable to perform glob matching as no name is available. |
static void |
main(String[] args)
CAUSION: This is a TEST ONLY method and will not run on anybody else's environment without serious modifications to paths and file names |
| Methods inherited from class eu.medsea.mimeutil.detector.MimeDetector |
|---|
addMimeHandler, getMimeHandlers, getMimeTypes, getMimeTypes, getMimeTypes, getMimeTypes, getMimeTypes, getName, removeMimeHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpendesktopMimeDetector(String mimeCacheFile)
public OpendesktopMimeDetector()
| Method Detail |
|---|
public String getDescription()
MimeDetector
getDescription in class MimeDetector
public Collection getMimeTypesFile(File file)
throws UnsupportedOperationException
getMimeTypesFile in class MimeDetectorUnsupportedOperationException
public Collection getMimeTypesInputStream(InputStream in)
throws UnsupportedOperationException
getMimeTypesInputStream in class MimeDetectorin - InputStream. If the InputStream does not support the mark() and reset() methods it will throw an exception.
UnsupportedOperationException
public Collection getMimeTypesByteArray(byte[] data)
throws UnsupportedOperationException
getMimeTypesByteArray in class MimeDetectordata - byte []. Is a byte array that you want to parse for matching mime types.
UnsupportedOperationExceptionpublic String dump()
public static void main(String[] args)
throws Exception
args -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||