Guest User

Untitled

a guest
Dec 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. String path = context.getFilesDir().getAbsolutePath();
  2.  
  3. File file = new File(path + "/abikor.txt");
  4.  
  5. int length = (int) file.length();
  6.  
  7. byte[] bytes = new byte[length];
  8.  
  9. FileInputStream in = new FileInputStream(file);
  10. try {
  11. in.read(bytes);
  12. } finally {
  13. in.close();
  14. }
  15.  
  16. String contents = new String(bytes);
Add Comment
Please, Sign In to add comment