Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public synchronized void writeString(String string) {
- Path logPath = Paths.get(ServiceOptions.getInstance().getCacheStorePath(), LOG_FILE_NAME);
- byte data[] = (string+"\n").getBytes();
- try (OutputStream out = new BufferedOutputStream(
- Files.newOutputStream(logPath, StandardOpenOption.CREATE, StandardOpenOption.APPEND))) {
- out.write(data, 0, data.length);
- } catch (IOException ioe) {
- LOGGER.error("", ioe);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement