List of utility methods to do Dump File
void | dumpFile(final Reader rdr) dump File dumpFile(System.out, rdr); |
byte[] | dumpFile(String filename) Dump a file content to an array of bytes. return dumpFile(new File(filename)); |
void | dumpFile(String filename) dump File File file = new File(filename); FileInputStream input = new FileInputStream(file); byte[] data = new byte[(int) file.length()]; input.read(data); System.out.println(filename + ":"); dump(data); |
void | dumpToFile(String dest, String content) dump To File FileWriter writer = new FileWriter(dest);
writer.write(content);
writer.close();
|
void | dumpToFile(String fileName, String buffer, boolean append) dump To File dumpToFile(fileName, buffer, append, "");
|
void | dumpToFile(String name, String string) dump To File File file = new File(name); File parentFile = file.getParentFile(); if (parentFile.exists() == false) { if (parentFile.mkdirs() == false) throw new IOException("Unable to create directories for " + parentFile.getAbsoluteFile()); FileWriter writer = new FileWriter(file); writer.write(string); ... |
File | dumptoTempFile(List dumpto Temp File File createTempFile = File.createTempFile("brule", "log"); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(createTempFile))); for (String line : lineItems) { writer.write(line); writer.newLine(); writer.close(); return createTempFile; ... |
void | dumpToTemporaryFile(String modifiedSource, String modifiedPythonFile) dump To Temporary File try { FileWriter writer = new FileWriter(new File(modifiedPythonFile)); writer.write(modifiedSource.toString()); writer.close(); } catch (IOException e1) { e1.printStackTrace(); |