List of utility methods to do PrintWriter Write
void | save(final Multimap save assert map != null; assert target != null; if (map.isEmpty()) { return; PrintWriter writer = new PrintWriter(new BufferedWriter(target)); for (String key : map.keySet()) { for (String value : map.get(key)) { ... |
void | save(Map save try { save(map, new FileOutputStream(fileName)); } catch (IOException e) { throw new RuntimeException(e); |
void | save(String fileName, List save PrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); for (String title : list) pw.println(title); pw.close(); |
void | save(String s, File file) save try { PrintWriter out = new PrintWriter(file); out.println(s); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); |
void | saveChiPhiTableCsv(PrintWriter wr, double[][] coefficients, String[] labelNames) Save Chi and Phi coefficients as .csv file. String line; line = "Chi;"; for (String labelName : labelNames) { line += labelName + ";"; wr.write(line); wr.write(System.getProperty("line.separator")); for (int i = 0; i < labelNames.length; i++) { ... |
void | saveConvert(final String text, final int escapeMode, final PrintWriter writer) Performs the necessary conversion of an java string into a property escaped string. if (text == null) { return; final char[] string = text.toCharArray(); final char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; for (int x = 0; x < string.length; x++) { final char aChar = string[x]; switch (aChar) { ... |
void | saveFile(File f, String text) Given a file to write to, and data to write to it, it will write the data. try (PrintWriter out = new PrintWriter(f)) { out.println(text); } catch (IOException ioex) { System.out.println("Could not write to file " + f.toString()); |
void | saveFile(String fileName, String data) save File PrintWriter writer = null; try { writer = new PrintWriter(fileName, "UTF-8"); writer.print(data); } catch (FileNotFoundException | UnsupportedEncodingException e) { e.printStackTrace(); } finally { if (writer != null) ... |
void | saveFile(String path, String text) save File PrintWriter out; try { out = new PrintWriter(path); out.print(text); out.close(); } catch (FileNotFoundException e) { throw e; |
void | saveHeatmapTableCsv(PrintWriter wr, double[][] coefficients, String[] labelNames) Save heatmap table as .csv file String line = new String(); line += " ;"; for (String labelName : labelNames) { line += labelName + ";"; wr.write(line); wr.write(System.getProperty("line.separator")); for (int i = 0; i < labelNames.length; i++) { ... |