111
FileOutputStream fos = null; try { fos = new FileOutputStream("fos.txt", true); for (int i = 0; i < 5; i++) { fos.write("hello".getBytes()); fos.write("\r\n".getBytes()); } } catch (IOException ex) { ex.printStackTrace(); } finally { if (fos != null) { try { fos.close(); } catch (IOException e) { e.printStackTrace(); } } }