Class MagicNumberReader

java.lang.Object
org.jgroups.conf.MagicNumberReader

public class MagicNumberReader extends Object
  • Field Details

    • MAGIC_NUMBER_FILE

      public static final String MAGIC_NUMBER_FILE
      See Also:
    • mMagicNumberFile

      public String mMagicNumberFile
    • log

      protected static final org.apache.commons.logging.Log log
  • Constructor Details

    • MagicNumberReader

      public MagicNumberReader()
  • Method Details

    • setFilename

      public void setFilename(String file)
    • 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
    • parse

      protected static ClassMap[] parse(InputStream stream) throws Exception
      Throws:
      Exception
    • parseClassData

      protected static ClassMap parseClassData(Node protocol) throws IOException
      Throws:
      IOException