// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.olios.model; import com.olio.util.ALog; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import org.json.JSONException; import org.json.JSONObject; // Referenced classes of package com.olio.olios.model: // JsonDataManager public class JsonData { private String fileIdentifier; protected JSONObject jsonObject; public JsonData(String s) { fileIdentifier = s; } public String fileIdentifier() { return fileIdentifier; } public String getFileIdentifier() { return fileIdentifier; } public JSONObject getJsonObject() { if (jsonObject == null) { updateCachedJson(); } return jsonObject; } public void setFileIdentifier(String s) { fileIdentifier = s; } public void updateCachedJson() { Object obj; Object obj1; Object obj3; String s; obj1 = null; s = null; obj3 = null; obj = obj1; Object obj2 = JsonDataManager.getInstance().jsonFile(fileIdentifier()); obj = obj1; ALog.d((new StringBuilder()).append("JsonData setting file directory: ").append(((File) (obj2)).toString()).toString(), new Object[0]); obj = obj1; obj1 = new FileInputStream(((File) (obj2))); obj = new BufferedReader(new InputStreamReader(((java.io.InputStream) (obj1)))); obj2 = new StringBuilder(); _L3: s = ((BufferedReader) (obj)).readLine(); if (s == null) goto _L2; else goto _L1 _L1: ((StringBuilder) (obj2)).append((new StringBuilder()).append(s).append("\n").toString()); goto _L3 obj2; _L7: obj = obj1; ALog.d("Couldn't open json file. This means it doesn't exist yet", new Object[] { obj2 }); obj = obj3; if (obj1 == null) { break MISSING_BLOCK_LABEL_156; } ((FileInputStream) (obj1)).close(); obj = obj3; break MISSING_BLOCK_LABEL_156; _L2: obj = ((StringBuilder) (obj2)).toString(); if (obj1 != null) { try { ((FileInputStream) (obj1)).close(); } // Misplaced declaration of an exception variable catch (Object obj1) { } } goto _L4 obj1; _L5: if (obj != null) { try { ((FileInputStream) (obj)).close(); } // Misplaced declaration of an exception variable catch (Object obj) { } } throw obj1; _L4: try { jsonObject = new JSONObject(((String) (obj))); return; } // Misplaced declaration of an exception variable catch (Object obj) { ALog.e("Formatting error for the settings object", ((Throwable) (obj)), new Object[0]); return; } // Misplaced declaration of an exception variable catch (Object obj) { ALog.d("Json doesn't exist yet", new Object[0]); } return; obj; obj = obj3; goto _L4 obj2; obj = obj1; obj1 = obj2; goto _L5 obj2; obj1 = s; if (true) goto _L7; else goto _L6 _L6: } }