(String filename)
| 99 | } |
| 100 | |
| 101 | public void fromFile(String filename) throws IOException { |
| 102 | try (InputStream is = new FileInputStream(filename)) { |
| 103 | String jsonString = IOUtils.toString(is, "UTF-8"); |
| 104 | JSONArray jsonArray = new JSONArray(jsonString); |
| 105 | fromJSON(jsonArray); |
| 106 | } catch (JSONException e) { |
| 107 | throw new IOException("Failed to load JSON file " + filename + ": " + e.getMessage(), e); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | public void fromList(List<String> stringList) { |
| 112 | for (String item : stringList) { |
no test coverage detected