List of utility methods to do Text File Write
void | writeString(File file, String content, boolean append) write String try { if (!file.exists()) { file.getParentFile().mkdirs(); file.createNewFile(); final FileWriter fileWriter = new FileWriter(file, append); fileWriter.append(content); fileWriter.close(); ... |
void | writeString(File file, String data) write String PrintWriter out = null; try { out = new PrintWriter(new FileOutputStream(file)); out.print(data); } finally { if (out != null) out.close(); |
void | writeString(File file, String s, int bufferSize, String encoding) Writes string to a file. if (s == null) { return; FileOutputStream fos = null; OutputStreamWriter osw = null; BufferedWriter out = null; try { fos = new FileOutputStream(file); ... |
void | writeString(File file, String str) write String OutputStream output = new FileOutputStream(file);
writeString(output, str);
|
void | writeString(File file, String str, String encoding) write String try (Writer out = new OutputStreamWriter(new FileOutputStream(file), encoding)) { out.write(str); |
void | writeString(File file, String string) write String writeString(file, string, "UTF-8");
|
void | writeString(File file, String string) write String FileOutputStream fos = null; try { fos = new FileOutputStream(file, false); fos.write(string.getBytes("UTF-8")); } catch (Exception e) { } finally { close(null, fos); |
void | writeString(File outputFile, String text) write String writeString(outputFile, text, DEFAULT_ENCODING); |
void | writeString(FileWriter fw, String s) Write string for (int i = 0; i < s.length(); i++) { fw.write((int) s.charAt(i)); |
void | writeString(final ObjectOutput objectOut, final String str) Writes (serializes) a string using the specified ObjectOutput interface. objectOut.writeObject(str); |