MCPcopy Create free account
hub / github.com/Syncleus/aparapi / getFileContent

Method getFileContent

src/test/java/com/aparapi/codegen/SwingDiff.java:195–214  ·  view source on GitHub ↗
(String string)

Source from the content-addressed store, hash-verified

193 }
194
195 private static String getFileContent(String string) {
196 String content = null;
197 try {
198 BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(string)));
199 StringBuilder sb = new StringBuilder();
200 for (String line = reader.readLine(); line != null; line = reader.readLine()) {
201 sb.append(line).append("\n");
202 }
203 reader.close();
204 content = sb.toString();
205 } catch (FileNotFoundException e) {
206 // TODO Auto-generated catch block
207 e.printStackTrace();
208 } catch (IOException e) {
209 // TODO Auto-generated catch block
210 e.printStackTrace();
211 }
212 return (content);
213
214 }
215
216}

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected