|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.medsea.mimeutil.detector.MimeDetector
public abstract class MimeDetector
ALL MimeDetector(s) must extend this class.
| Constructor Summary | |
|---|---|
MimeDetector()
|
|
| Method Summary | |
|---|---|
void |
addMimeHandler(MimeHandler handler)
Add a mime handler to this MimeDetector. |
abstract String |
getDescription()
Abstract method to be implement by concrete MimeDetector(s). |
Set |
getMimeHandlers()
Return the Set of MimeHandler(s). |
Collection |
getMimeTypes(byte[] data)
This method is called by the MimeUtil getMimeTypes(byte []) method via the MimeUtil.MimeUtilMimeDetectorRegistry class. |
Collection |
getMimeTypes(File file)
This method is called by the MimeUtil getMimeTypes(File) method via the MimeUtil.MimeUtilMimeDetectorRegistry class. |
Collection |
getMimeTypes(InputStream in)
This method is called by the MimeUtil getMimeTypes(InputStream) method via the MimeUtil.MimeUtilMimeDetectorRegistry class. |
Collection |
getMimeTypes(String fileName)
This method is called by the MimeUtil getMimeTypes(fileName) method via the MimeUtil.MimeUtilMimeDetectorRegistry class. |
Collection |
getMimeTypes(URLConnection url)
This method is called by the MimeUtil getMimeTypes(URLConnection) method via the MimeUtil.MimeUtilMimeDetectorRegistry class. |
abstract Collection |
getMimeTypesByteArray(byte[] data)
Abstract method that must be implemented by concrete MimeDetector(s). |
abstract Collection |
getMimeTypesFile(File file)
Abstract method that must be implemented by concrete MimeDetector(s). |
abstract Collection |
getMimeTypesInputStream(InputStream in)
Abstract method that must be implemented by concrete MimeDetector(s). |
String |
getName()
Gets the name of this MimeDetector |
boolean |
removeMimeHandler(MimeHandler handler)
remove a mime handler to this MimeDetector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimeDetector()
| Method Detail |
|---|
public final String getName()
public final void addMimeHandler(MimeHandler handler)
handler - public final boolean removeMimeHandler(MimeHandler handler)
handler -
public final Set getMimeHandlers()
public final Collection getMimeTypes(byte[] data)
data -
public final Collection getMimeTypes(URLConnection url)
url -
public final Collection getMimeTypes(File file)
throws MimeException
file -
MimeException
public final Collection getMimeTypes(String fileName)
throws MimeException
file -
MimeException
public final Collection getMimeTypes(InputStream in)
throws MimeException
file -
MimeExceptionpublic abstract String getDescription()
public abstract Collection getMimeTypesFile(File file)
throws UnsupportedOperationException
file -
UnsupportedOperationException
public abstract Collection getMimeTypesInputStream(InputStream in)
throws UnsupportedOperationException
in - InputStream. If the InputStream does not support the mark() and reset() methods it will throw an exception.
UnsupportedOperationException
public abstract Collection getMimeTypesByteArray(byte[] data)
throws UnsupportedOperationException
data - byte []. Is a byte array that you want to parse for matching mime types.
UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||