public class CSAppUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CSAppUtils.DateComapareType
Type to compare dates.
|
| Constructor and Description |
|---|
CSAppUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.json.JSONObject |
getJsonFromCacheFile(File file)
To retrieve data from cache.
|
String |
getMD5FromString(String value)
To encrypt given value.
|
boolean |
getResponseTimeFromCacheFile(File file,
long time)
To check if required response within given time window available in cache
|
static Calendar |
parseDate(String date,
String dateFormat,
TimeZone timeZone)
Converts the given date to the user's timezone.
|
static Calendar |
parseDate(String date,
TimeZone timeZone)
Converts the given date to user's timezone.
|
static void |
showLog(String builtObject,
String s) |
public boolean getResponseTimeFromCacheFile(File file, long time)
file - cache file.time - timepublic static org.json.JSONObject getJsonFromCacheFile(File file)
file - cache file.public String getMD5FromString(String value)
value - stringpublic static Calendar parseDate(String date, TimeZone timeZone) throws ParseException
date - date in ISO format.Calendar object.ParseException - CSAppUtils.parseDate(dateString, TimeZone.getDefault());
public static Calendar parseDate(String date, String dateFormat, TimeZone timeZone) throws ParseException
date - date in string format.dateFormat - date format.Calendar object.ParseException -
CSAppUtils.parseDate(dateString, "yyyy-MM-dd'T'HH:mm:ssZ", TimeZone.getTimeZone("GMT"));
Copyright © 2019 Contentstack. All rights reserved.