Package org.jgroups.conf
Class MagicNumberReader
java.lang.Object
org.jgroups.conf.MagicNumberReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Log
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ClassMap[]
parse
(InputStream stream) protected static ClassMap
parseClassData
(Node protocol) ClassMap[]
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
(String file)
-
Field Details
-
MAGIC_NUMBER_FILE
- See Also:
-
mMagicNumberFile
-
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
MagicNumberReader
public MagicNumberReader()
-
-
Method Details
-
setFilename
-
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)- Returns:
- an array of ClassMap objects that where parsed from the file (if found) or an empty array if file not found or had en exception
-
parse
- Throws:
Exception
-
parseClassData
- Throws:
IOException
-