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

Method getData

src/main/java/ChainValidatiton/Test.java:16–41  ·  view source on GitHub ↗
(String fileName)

Source from the content-addressed store, hash-verified

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

Callers 1

mainMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected