code: private static void loadConf(InputStream in) {
          try(BufferedReader reader = new BufferedReader(new InputStreamReader(in, "utf-8"))){
              String line;
              while((line = reader.readLine()) != null){
                  line = line.trim();                
                  if("".equals(line) || line.startsWith("#")){
                      continue;
                  }
                  int index = line.indexOf("=");
                  if(index==-1){
                      LOGGER.error("错误的配置："+line);
                      continue;
                  }
                  //有K V
                  if(index>0 && line.length()>index+1) {
                      String key = line.substring(0, index).trim();
                      String value = line.substring(index + 1, line.length()).trim();
                      conf.put(key, value);
                  }
                  //有K无V
                  else if(index>0 && line.length()==index+1) {
                      String key = line.substring(0, index).trim();
                      conf.put(key, "");
                  }else{
                      LOGGER.error("错误的配置："+line);
                  }
              }
          } catch (IOException ex) {
              System.err.println("配置文件加载失败:"+ex.getMessage());
              throw new RuntimeException(ex);
          }
      }
docs: 加载配置文件
  @param in 文件输入流