Skip to content

Instantly share code, notes, and snippets.

@hoseinquest
Created May 18, 2015 07:55
Show Gist options
  • Save hoseinquest/507af5f43368e499eec7 to your computer and use it in GitHub Desktop.
Save hoseinquest/507af5f43368e499eec7 to your computer and use it in GitHub Desktop.
Android Read Text File From Assets
InputStream input;
try {
input = getAssets().open(fileName);
int size = input.available();
byte[] buffer = new byte[size];
input.read(buffer);
input.close();
String text = new String(buffer);
}
catch (IOException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment