public class CSAppUtils
extends java.lang.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(java.io.File file)
To retrieve data from cache.
|
java.lang.String |
getMD5FromString(java.lang.String value)
To encrypt given value.
|
boolean |
getResponseTimeFromCacheFile(java.io.File file,
long time)
To check if required response within given time window available in cache
|
static java.util.Calendar |
parseDate(java.lang.String date,
java.lang.String dateFormat,
java.util.TimeZone timeZone)
Converts the given date to the user's timezone.
|
static java.util.Calendar |
parseDate(java.lang.String date,
java.util.TimeZone timeZone)
Converts the given date to user's timezone.
|
static void |
showLog(java.lang.String tag,
java.lang.String message) |
public static void showLog(java.lang.String tag, java.lang.String message)
public boolean getResponseTimeFromCacheFile(java.io.File file, long time)
file
- cache file.time
- timepublic static org.json.JSONObject getJsonFromCacheFile(java.io.File file)
file
- cache file.public java.lang.String getMD5FromString(java.lang.String value)
value
- stringpublic static java.util.Calendar parseDate(java.lang.String date, java.util.TimeZone timeZone) throws java.text.ParseException
date
- date in ISO format.Calendar
object.java.text.ParseException
- BuiltUtil.parseDate(dateString, TimeZone.getDefault());
public static java.util.Calendar parseDate(java.lang.String date, java.lang.String dateFormat, java.util.TimeZone timeZone) throws java.text.ParseException
date
- date in string format.dateFormat
- date format.Calendar
object.java.text.ParseException
- BuiltUtil.parseDate(dateString, "yyyy-MM-dd'T'HH:mm:ssZ", TimeZone.getTimeZone("GMT"));