I want to read json file which have large amount of data
My code
public String loadJSONFromAsset() {
f = new File(Environment.getExternalStorageDirectory().getPath() + "/Contact Backup/name.json");
String json = null;
try {
InputStream is;
is = new BufferedInputStream(new FileInputStream(f));
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
json = new String(buffer, "UTF-8");
} catch (IOException ex) {
ex.printStackTrace();
return null;
}
return json;
}
In my logcat, it shows only half json file was readed.
Any help?