Here you can find the source of write(String msg)
public static void write(String msg)
//package com.java2s; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; public class Main { public static void write(String msg) { Path path = Paths.get("D:\\Program Files\\apache-activemq-5.10.0\\data\\test.txt"); try {// w w w . ja v a 2s .c o m Files.write(path, msg.getBytes(), StandardOpenOption.APPEND); } catch (IOException e) { throw new RuntimeException(msg, e); } } }