public static boolean getCategoryFromCache() {
CacheHotQuestion cache = new CacheHotQuestion(MyApplication.getAppContext(), "hotquestion.json");
String content = null;
String contentStr = cache.ReadContent();
if (contentStr != null) {
content = contentStr;
} else {
InputStream in;
try {
in = MyApplication.getAppContext().getAssets().open("hotquestion.json");
byte[] buf = new byte[in.available()];
in.read(buf);
content = new String(buf);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return parseHotQuestion(content);
}