public class BasicDetector extends AbstractDetector
childList, message, valid| Constructor and Description |
|---|
BasicDetector() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Element e) |
char |
getComparator() |
String |
getDesignation()
todo: I noticed there is also a %5.5s variation in magic...
|
int |
getOffset() |
String |
getRawInput() |
String |
getTest() |
String |
getType() |
void |
setComparator(char comparator) |
void |
setOffset(String offset) |
void |
setTest(String test) |
void |
setType(String type) |
boolean |
test(byte[] lithmus) |
protected boolean |
testByte(byte[] lithmus)
Test whether a byte matches
|
protected boolean |
testLong(byte[] lithmus,
int endian)
Test whether a long matches
|
protected boolean |
testShort(byte[] lithmus,
int endian)
Test whether a short matches
|
protected boolean |
testString(byte[] lithmus)
Test whether a string matches
|
String |
toString() |
void |
toXML(FileWriter f)
XML notatie:
|
void |
toXML(FileWriter f,
int level) |
protected String |
xmlEntities(String s) |
addChild, getExtension, getExtensions, getMimeType, setDesignation, setExtension, setMimeType, setValid, validpublic void setOffset(String offset)
public int getOffset()
public void setType(String type)
public String getType()
public void setTest(String test)
public String getTest()
public void setComparator(char comparator)
public char getComparator()
public boolean test(byte[] lithmus)
public String getDesignation()
getDesignation in interface DetectorgetDesignation in class AbstractDetectorprotected boolean testString(byte[] lithmus)
protected boolean testShort(byte[] lithmus,
int endian)
protected boolean testLong(byte[] lithmus,
int endian)
protected boolean testByte(byte[] lithmus)
public String getRawInput()
public void toXML(FileWriter f) throws IOException
IOExceptionpublic void toXML(FileWriter f, int level) throws IOException
level - Indicates depth of (child) elementIOExceptionpublic void configure(Element e)
configure in interface Detectorconfigure in class AbstractDetectorpublic String toString()
toString in class AbstractDetectorMMBase 1.9-SNAPSHOT - ${javadoctimestamp}