Created
February 27, 2020 06:26
-
-
Save Gkemon/cf0d210389c4b084f1087da01d4a6b85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File file = new File(sdcard,"Android/file.txt"); | |
StringBuilder text = new StringBuilder(); | |
try { | |
BufferedReader br = new BufferedReader(new FileReader(file)); | |
String line; | |
while ((line = br.readLine()) != null) { | |
text.append(line); | |
text.append('\n'); | |
} | |
br.close(); | |
return text.toString(); | |
} | |
catch (IOException e) { | |
return e.getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment