Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void saveConfig() {
- try {
- if (this.configFile.exists()) {
- this.configFile.delete();
- }
- if (this.configFile.createNewFile()) {
- try (Writer writer = new BufferedWriter(new OutputStreamWriter(
- new FileOutputStream(configFile), "UTF-8"))) {
- this.gson.toJson(list, List.class, writer);
- }
- }
- } catch (IOException ex) {
- Logging.severe("Error save config", ex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment