@Test public void testWriteStringToFile() throws Exception { File file = new File(testRootDir, "testWriteStringToFile"); assertTrue(!file.exists()); IOTinyUtils.writeStringToFile(file, "testWriteStringToFile", RemotingHelper.DEFAULT_CHARSET); assertTrue(file.exists()); }
public static void writeStringToFile(File file, String data, String encoding) throws IOException { OutputStream os = null; try { os = new FileOutputStream(file); os.write(data.getBytes(encoding)); } finally { if (null != os) { os.close(); } } }
IOTinyUtils { public static void writeStringToFile(File file, String data, String encoding) throws IOException { OutputStream os = null; try { os = new FileOutputStream(file); os.write(data.getBytes(encoding)); } finally { if (null != os) { os.close(); } } } }
IOTinyUtils { public static void writeStringToFile(File file, String data, String encoding) throws IOException { OutputStream os = null; try { os = new FileOutputStream(file); os.write(data.getBytes(encoding)); } finally { if (null != os) { os.close(); } } }  }
IOTinyUtils { public static void writeStringToFile(File file, String data, String encoding) throws IOException { OutputStream os = null; try { os = new FileOutputStream(file); os.write(data.getBytes(encoding)); } finally { if (null != os) { os.close(); } } }  static String toString(InputStream input, String encoding); static String toString(Reader reader); static long copy(Reader input, Writer output); static List<String> readLines(Reader input); static void copyFile(String source, String target); static void delete(File fileOrDir); static void cleanDirectory(File directory); static void writeStringToFile(File file, String data, String encoding); }
IOTinyUtils { public static void writeStringToFile(File file, String data, String encoding) throws IOException { OutputStream os = null; try { os = new FileOutputStream(file); os.write(data.getBytes(encoding)); } finally { if (null != os) { os.close(); } } }  static String toString(InputStream input, String encoding); static String toString(Reader reader); static long copy(Reader input, Writer output); static List<String> readLines(Reader input); static void copyFile(String source, String target); static void delete(File fileOrDir); static void cleanDirectory(File directory); static void writeStringToFile(File file, String data, String encoding);  }