Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String file_read(String filename){
- InputStream input;
- String text = "";
- try {
- AssetManager assetManager = getAssets();
- input = assetManager.open(filename);
- int size = input.available();
- byte[] buffer = new byte[size];
- input.read(buffer);
- input.close();
- text = new String(buffer);
- } catch(IOException e){
- e.printStackTrace();
- }
- return text;
- }
- ______________________________________________________________________________________
- HTTP://ANONTHING.PL
- HTTP://HACKTUT.UGU.PL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement