List of utility methods to do Temp File Write
File | writeStringToTempFile(String contents, String path, String encoding) Writes a string to a temporary file OutputStream writer = null; File tmp = File.createTempFile(path, ".tmp"); if (path.endsWith(".gz")) { writer = new GZIPOutputStream(new FileOutputStream(tmp)); } else { writer = new BufferedOutputStream(new FileOutputStream(tmp)); writer.write(contents.getBytes(encoding)); ... |
void | writeStringToTempFileNoExceptions(String contents, String path) Writes a string to a temporary file with UTF-8 encoding, squashing exceptions writeStringToTempFileNoExceptions(contents, path, "UTF-8");
|