void (Logger logger, File xmlFile, String content) { try { try (OutputStream stream = new FileOutputStream(xmlFile, false)) { byte[] text = content.getBytes(StandardCharsets.UTF_8); stream.write(text, 0, text.length); } } catch (IOException e) { logger.log(e); } }