|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MCRFileContentTypeDetector
Detects the file content type from filename and file header. The rules to do this are implementation specific, but MyCoRe provides a simple detector implementation in the class MCRSimpleFCTDetector.
MCRSimpleFCTDetector| Method Summary | |
|---|---|
void |
addRule(MCRFileContentType type,
Element rules)
Adds a detection rule from the file content type definition XML file. |
MCRFileContentType |
detectType(String filename,
byte[] header)
Detects the file content type from filename and/or file header. |
| Method Detail |
|---|
void addRule(MCRFileContentType type,
Element rules)
type - the file content type the rule is forrules - the rules XML element containing the rules for detecting that
type
MCRFileContentType detectType(String filename,
byte[] header)
filename - the name of the fileheader - the first bytes of the file content
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||