public static void main(String[] args) throws IOException {
FileOutputStream fo = new FileOutputStream("test.txt",true);
for (int i = 0; i < 10; i++) {
fo.write("hello world".getBytes());
fo.write("\r\n".getBytes());
}
fo.close();