(String path)
| 123 | } |
| 124 | |
| 125 | public static double[] readDoubleArrayFromFile(String path) throws FileNotFoundException, IOException { |
| 126 | ArrayDeque<Double> tmpQueue = new ArrayDeque<>(); |
| 127 | BufferedReader br = getTextFileReader(path); |
| 128 | for (String line; (line = br.readLine()) != null; ) { |
| 129 | tmpQueue.add(Double.parseDouble(line.trim())); |
| 130 | } |
| 131 | |
| 132 | br.close(); |
| 133 | |
| 134 | return tmpQueue.stream().mapToDouble(i->i).toArray(); |
| 135 | } |
| 136 | |
| 137 | public static void writeIntArrayToFile(File f, int[] arr) throws IOException { |
| 138 | BufferedWriter fr = new BufferedWriter(new FileWriter(f, false)); |
nothing calls this directly
no test coverage detected