public class MagicNumberReader
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected static org.apache.commons.logging.Log |
log |
|
static java.lang.String |
MAGIC_NUMBER_FILE |
|
java.lang.String |
mMagicNumberFile |
Constructor | Description |
---|---|
MagicNumberReader() |
Modifier and Type | Method | Description |
---|---|---|
protected static ClassMap[] |
parse(java.io.InputStream stream) |
|
protected static ClassMap |
parseClassData(org.w3c.dom.Node protocol) |
|
ClassMap[] |
readMagicNumberMapping() |
try to read the magic number configuration file as a Resource form the classpath using getResourceAsStream
if this fails this method tries to read the configuration file from mMagicNumberFile using a FileInputStream (not in classpath but somewhere else in the disk)
|
void |
setFilename(java.lang.String file) |
public static final java.lang.String MAGIC_NUMBER_FILE
public java.lang.String mMagicNumberFile
protected static final org.apache.commons.logging.Log log
public void setFilename(java.lang.String file)
public ClassMap[] readMagicNumberMapping()
protected static ClassMap[] parse(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
protected static ClassMap parseClassData(org.w3c.dom.Node protocol) throws java.io.IOException
java.io.IOException
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.