示例#1
0
 /**
  * overloaded static method used to load the configuration file.
  *
  * @param is
  */
 public static void initConfig(InputStream is) throws IOException {
   try {
     ConfigManager.getInstance().load(is);
   } catch (IOException ioe) {
     LoggingManager.debug(BaseService.class, ioe.getMessage(), ioe);
     throw ioe;
   }
 }
示例#2
0
 /**
  * overloaded static method used to load the configuration file
  *
  * @param filepath
  */
 public static void initConfig(String filepath) throws IOException {
   try {
     File file = new File(filepath);
     initConfig(file);
   } catch (IOException ioe) {
     LoggingManager.debug(BaseService.class, ioe.getMessage(), ioe);
     throw ioe;
   }
 }
示例#3
0
 /**
  * overloaded static method used to load the configuration file
  *
  * @param file
  */
 public static void initConfig(File file) throws IOException {
   try {
     if (!file.exists()) {
       throw new FileNotFoundException("File doesn't exist: " + file.getAbsolutePath());
     }
     FileInputStream fis = new FileInputStream(file);
     initConfig(fis);
   } catch (IOException ioe) {
     LoggingManager.debug(BaseService.class, ioe.getMessage(), ioe);
     throw ioe;
   }
 }