(Config config, Path target)
| 14 | public class ConfigIO { |
| 15 | |
| 16 | public static void write(Config config, Path target) throws IOException { |
| 17 | Gson gson = new GsonBuilder().setPrettyPrinting() |
| 18 | .create(); |
| 19 | String toSafe = gson.toJson(config); |
| 20 | |
| 21 | Files.write(target, toSafe.getBytes()); |
| 22 | } |
| 23 | |
| 24 | public static Config obtain(Config config, Path path) { |
| 25 | try { |
no test coverage detected