|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.core.JsonUtils
public class JsonUtils
Has some handy utility functions viz. for operating on json objects
Method Summary | |
---|---|
static JSONObject |
jsonRoot(java.io.InputStream is)
Returns root JSON object found in the file |
static java.lang.String[] |
listOfAllComicClasses(JSONArray classes)
Given the json-array of classes, this will give the list of all comic class names |
static java.lang.String[] |
listOfAllComicClasses(java.lang.String file,
AssetManager am,
java.lang.String key)
Returns a list of all comic class names from the JSON array found in the file (stored in android_asset) |
static java.lang.String[] |
listOfAllComicNames(JSONArray classes)
Given the json-array of classes, this will give the list of all comic names |
static java.lang.String[] |
listOfAllComicNames(java.lang.String file,
AssetManager am,
java.lang.String key)
Returns a list of all comic names from the JSON array found in the file (stored in android_asset) |
static java.lang.String[] |
listOfAllComicPrefKeys(JSONArray classes)
Given the json-array of classes, this will give the list of all comic pref keys |
static java.lang.String[] |
listOfAllComicPrefKeys(java.lang.String file,
AssetManager am,
java.lang.String key)
Returns a list of all new comic indices from the JSON array found in the file (stored in android_asset) |
static java.util.ArrayList<java.lang.Integer> |
listOfAllNewComicIndices(JSONArray classes)
Given the json-array of classes, this will give the list of all new comic indices |
static java.util.ArrayList<java.lang.Integer> |
listOfAllNewComicIndices(java.lang.String file,
AssetManager am,
java.lang.String key)
Returns a list of all new comic indices from the JSON array found in the file (stored in android_asset) |
static JSONArray |
listOfComics(java.lang.String file,
AssetManager am,
java.lang.String key)
Returns a list of comics from the JSON object found in the file (stored in android_asset) |
static JSONObject |
settingsRoot(java.lang.String file,
AssetManager am)
Returns the root JSON object found in the file (stored in android_asset) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JSONObject settingsRoot(java.lang.String file, AssetManager am) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input file
java.io.IOException
JSONException
public static JSONObject jsonRoot(java.io.InputStream is) throws java.io.IOException, JSONException
is
- input stream from where to read the json-string
java.io.IOException
JSONException
public static JSONArray listOfComics(java.lang.String file, AssetManager am, java.lang.String key) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input filekey
- the key which stores the list of all classes
JSONException
java.io.IOException
public static java.lang.String[] listOfAllComicClasses(JSONArray classes) throws JSONException
classes
- the json-array.
JSONException
public static java.lang.String[] listOfAllComicClasses(java.lang.String file, AssetManager am, java.lang.String key) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input filekey
- the key which stores the list of all classes
JSONException
java.io.IOException
public static java.lang.String[] listOfAllComicNames(JSONArray classes) throws JSONException
classes
- the json-array.
JSONException
public static java.lang.String[] listOfAllComicNames(java.lang.String file, AssetManager am, java.lang.String key) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input filekey
- the key which stores the list of all classes
JSONException
java.io.IOException
public static java.util.ArrayList<java.lang.Integer> listOfAllNewComicIndices(JSONArray classes) throws JSONException
classes
- the json-array.
JSONException
public static java.util.ArrayList<java.lang.Integer> listOfAllNewComicIndices(java.lang.String file, AssetManager am, java.lang.String key) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input filekey
- the key which stores the list of all classes
JSONException
java.io.IOException
public static java.lang.String[] listOfAllComicPrefKeys(JSONArray classes) throws JSONException
classes
- the json-array.
JSONException
public static java.lang.String[] listOfAllComicPrefKeys(java.lang.String file, AssetManager am, java.lang.String key) throws java.io.IOException, JSONException
file
- the file of interestam
- the asset manager which will be used to find the input filekey
- the key which stores the list of all classes
JSONException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |