MCPcopy Create free account
hub / github.com/RipMeApp/ripme / fromFile

Method fromFile

src/main/java/com/rarchives/ripme/ui/History.java:101–109  ·  view source on GitHub ↗
(String filename)

Source from the content-addressed store, hash-verified

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) {

Callers 2

loadHistoryMethod · 0.80
loadHistoryMethod · 0.80

Calls 2

fromJSONMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected