Skip to content

Instantly share code, notes, and snippets.

@k4m4r82
Created October 14, 2014 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k4m4r82/8d2f6277b7164c97446c to your computer and use it in GitHub Desktop.
Save k4m4r82/8d2f6277b7164c97446c to your computer and use it in GitHub Desktop.
private void bacaFileJson(String fileName) {
try {
InputStream inputStream = this.context.getAssets().open(fileName);
InputStreamReader streamReader = new InputStreamReader(inputStream);
BufferedReader reader = new BufferedReader(streamReader);
while (reader.ready()) {
String json = reader.readLine();
Log.d("Json", json);
}
} catch (IOException e) {
Log.d("Error", e.getMessage());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment