示例#1
0
 protected Config readConfig(String fileName) throws IOException, ConfigInvalidException {
   Config rc = new Config();
   String text = readUTF8(fileName);
   if (!text.isEmpty()) {
     try {
       rc.fromText(text);
     } catch (ConfigInvalidException err) {
       throw new ConfigInvalidException(
           "Invalid config file " + fileName + " in commit " + revision.name(), err);
     }
   }
   return rc;
 }
 private static Config readConfig(String dat) throws ConfigInvalidException {
   Config config = new Config();
   config.fromText(dat);
   return config;
 }
 private void readConfig(final String dat) throws ConfigInvalidException {
   config = new Config();
   config.fromText(dat);
 }