|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Recognizer
A recognizer is able to guess the data type of a data stream by inspecting a few bytes at the beginning of the stream.
| Field Summary | |
|---|---|
static java.lang.String |
CONTENT_TYPE_OCTET_STREAM
This value is returned by #getContentType(byte[]) when the recognizer was not able to determine the content type of the data snippet. |
static java.lang.String |
CONTENT_TYPE_UNKNOWN
This value is returned by #getContentType(byte[]) when the recognizer was not able to determine the content type of the data snippet. |
| 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. |
| Field Detail |
|---|
static final java.lang.String CONTENT_TYPE_UNKNOWN
static final java.lang.String CONTENT_TYPE_OCTET_STREAM
| Method Detail |
|---|
int getMinimalDeterminableDataLength()
java.lang.String getContentType(byte[] dataSnippet)
dataSnippet - 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 | ||||||||