public static void saveConfig(File file, Configuration conf) throws IOException {
    try (Writer writer = Files.newWriter(file, StandardCharsets.UTF_8)) {
      conf.writeXml(writer);
    }
  }
Saves configuration to a file.
@param file File to save
@param conf Configuration contents to write to file
@throws IOException if there is an I/O error saving the file
hbase-http/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java