|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.activation.URLConnectionRecognizer
public class URLConnectionRecognizer
This content type detector uses java.net.URLConnection#guessContentTypeFromStream() to determine the type of data.
| Field Summary |
|---|
| Fields inherited from interface ch.randelshofer.activation.Recognizer |
|---|
CONTENT_TYPE_OCTET_STREAM, CONTENT_TYPE_UNKNOWN |
| Constructor Summary | |
|---|---|
URLConnectionRecognizer()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getContentType(byte[] dataSnippet)
Return the base MIME Type of this data. |
int |
getMinimalDeterminableDataLength()
Return the number of bytes needed to determine the content type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLConnectionRecognizer()
| Method Detail |
|---|
public int getMinimalDeterminableDataLength()
getMinimalDeterminableDataLength in interface Recognizerpublic java.lang.String getContentType(byte[] dataSnippet)
getContentType in interface RecognizerdataSnippet - the first few bytes of the data file.
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||