MCPcopy Create free account
hub / github.com/GCMiner/GCMiner / getData

Method getData

src/main/java/com/ReadChain.java:17–42  ·  view source on GitHub ↗
(String fileName)

Source from the content-addressed store, hash-verified

15
16public class ReadChain {
17 public String getData(String fileName) {
18 String Path="src\\test\\java\\com\\result\\" + fileName + ".json";
19 BufferedReader reader = null;
20 StringBuilder laststr = new StringBuilder();
21 try {
22 FileInputStream fileInputStream = new FileInputStream(Path);
23 InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, StandardCharsets.UTF_8);
24 reader = new BufferedReader(inputStreamReader);
25 String tempString;
26 while ((tempString = reader.readLine()) != null) {
27 laststr.append(tempString);
28 }
29 reader.close();
30 } catch (IOException e) {
31 e.printStackTrace();
32 } finally {
33 if (reader != null) {
34 try {
35 reader.close();
36 } catch (IOException e) {
37 e.printStackTrace();
38 }
39 }
40 }
41 return laststr.toString();
42 }
43
44 public String get_ClassName (JsonNode results, int chain_id, int node_id) {
45 JsonNode ClassName = results.get(chain_id).get("ClassName");

Callers 1

isGadgetChainMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected