Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- File myFile = new File(android.os.Environment.getExternalStorageDirectory() + fileName);
- BufferedInputStream buf = new BufferedInputStream(new FileInputStream(myFile));
- buf.read(buffer, 0, buffer.length);
- buf.close();
- } catch (FileNotFoundException e) {
- Toast.makeText(getApplicationContext(),"File Not Found"+fileName,Toast.LENGTH_LONG).show();
- e.printStackTrace();
- } catch (IOException e) {
- Toast.makeText(getApplicationContext(),"IOException",Toast.LENGTH_LONG).show();
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement