(JSONArray jsonArray)
| 91 | } |
| 92 | |
| 93 | private void fromJSON(JSONArray jsonArray) { |
| 94 | JSONObject json; |
| 95 | for (int i = 0; i < jsonArray.length(); i++) { |
| 96 | json = jsonArray.getJSONObject(i); |
| 97 | list.add(new HistoryEntry().fromJSON(json)); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | public void fromFile(String filename) throws IOException { |
| 102 | try (InputStream is = new FileInputStream(filename)) { |