| 14 | |
| 15 | public 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; |