public class FormatModule extends Object implements FormatModuleIF
Modifier and Type | Field and Description |
---|---|
protected FormatModuleIF |
fallout_module |
protected List<FormatModuleIF> |
modules |
Constructor and Description |
---|
FormatModule() |
Modifier and Type | Method and Description |
---|---|
static int |
detectCharSet(byte[] content) |
FormatModuleIF |
detectFormat(ClassifiableContentIF cc) |
static byte[] |
getBytes(String s) |
static byte[][] |
getBytes(String[] s) |
static String |
getCharSetName(int charSet) |
static int |
getOffset(int charSet) |
boolean |
matchesContent(ClassifiableContentIF cc)
INTERNAL: Returns true if the content of the classifiable content
is considered to be of the supported format.
|
static boolean |
matchesExtension(String uri,
String[] extensions) |
boolean |
matchesIdentifier(ClassifiableContentIF cc)
INTERNAL: Returns true if the identifier of the classifiable
content is considered to be indicating the supported format.
|
void |
readContent(ClassifiableContentIF cc,
TextHandlerIF handler)
INTERNAL: Reads and analyzes the classifiable content and
triggers callbacks on the text handler to identify the text and
the structure of the classifiable content.
|
static boolean |
startsWith(byte[] content,
byte[] s) |
static boolean |
startsWithSkipWhitespace(byte[] content,
byte[] s) |
static boolean |
startsWithSkipWhitespace(byte[] content,
byte[][] ss) |
protected List<FormatModuleIF> modules
protected FormatModuleIF fallout_module
public boolean matchesContent(ClassifiableContentIF cc)
FormatModuleIF
matchesContent
in interface FormatModuleIF
public boolean matchesIdentifier(ClassifiableContentIF cc)
FormatModuleIF
matchesIdentifier
in interface FormatModuleIF
public void readContent(ClassifiableContentIF cc, TextHandlerIF handler)
FormatModuleIF
readContent
in interface FormatModuleIF
public FormatModuleIF detectFormat(ClassifiableContentIF cc)
public static String getCharSetName(int charSet)
public static int getOffset(int charSet)
public static int detectCharSet(byte[] content)
public static byte[] getBytes(String s)
public static byte[][] getBytes(String[] s)
public static boolean startsWith(byte[] content, byte[] s)
public static boolean startsWithSkipWhitespace(byte[] content, byte[][] ss)
public static boolean startsWithSkipWhitespace(byte[] content, byte[] s)