(String path)
| 111 | } |
| 112 | |
| 113 | public static int[] readIntArrayFromFile(String path) throws FileNotFoundException, IOException { |
| 114 | ArrayDeque<Integer> tmpQueue = new ArrayDeque<>(); |
| 115 | BufferedReader br = getTextFileReader(path); |
| 116 | for (String line; (line = br.readLine()) != null; ) { |
| 117 | tmpQueue.add(Integer.parseInt(line.trim())); |
| 118 | } |
| 119 | |
| 120 | br.close(); |
| 121 | |
| 122 | return tmpQueue.stream().mapToInt(i->i).toArray(); |
| 123 | } |
| 124 | |
| 125 | public static double[] readDoubleArrayFromFile(String path) throws FileNotFoundException, IOException { |
| 126 | ArrayDeque<Double> tmpQueue = new ArrayDeque<>(); |
no test coverage detected