org.jgroups.conf

Class MagicNumberReader

public class MagicNumberReader extends Object

Reads and maintains mapping between magic numbers and classes

Version: 1.0

Author: Filip Hanik (filip@filip.net)

Field Summary
protected static Loglog
StringmMagicNumberFile
static StringMAGIC_NUMBER_FILE
Method Summary
protected static ClassMap[]parse(InputStream stream)
protected static ClassMapparseClassData(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)
voidsetFilename(String file)

Field Detail

log

protected static final Log log

mMagicNumberFile

public String mMagicNumberFile

MAGIC_NUMBER_FILE

public static final String MAGIC_NUMBER_FILE

Method Detail

parse

protected static ClassMap[] parse(InputStream stream)

parseClassData

protected static ClassMap parseClassData(Node protocol)

readMagicNumberMapping

public 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)

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

setFilename

public void setFilename(String file)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.