MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / readIntArrayFromFile

Method readIntArrayFromFile

src/rnabloom/util/FileUtils.java:113–123  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

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<>();

Callers 3

avaClusteredOLCMethod · 0.80
mapClusteredOLCMethod · 0.80
filterEdgesMethod · 0.80

Calls 3

getTextFileReaderMethod · 0.95
addMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected