Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. try{
  2. AssetManager asset=context.getAssets();
  3. InputStream in = asset.open(src);
  4. OutputStream out = new FileOutputStream(new File(dst));//ERROR IS FROM THIS LINE
  5. // Transfer bytes from in to out
  6. byte[] buf = new byte[1024];
  7. int len;
  8. while ((len = in.read(buf)) > 0) {
  9. out.write(buf, 0, len);
  10. Log.i("Copying", "please wait...");
  11. }
  12. in.close();
  13. out.close();
  14. out.flush();
  15. }catch(Exception e){
  16. e.printStackTrace();
  17. }
  18. }
  19.  
  20. 09-18 16:05:20.096: W/System.err(4219): java.io.FileNotFoundException: /quran/data/database_tafsir_persian_azim: open failed: ENOENT (No such file or directory)
  21. 09-18 16:05:20.165: D/TextLayoutCache(4219): Using debug level: 0 - Debug Enabled: 0
  22. 09-18 16:05:20.175: W/System.err(4219): at libcore.io.IoBridge.open(IoBridge.java:419)
  23. 09-18 16:05:20.175: W/System.err(4219): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
  24. 09-18 16:05:20.175: W/System.err(4219): at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
  25. 09-18 16:05:20.175: W/System.err(4219): at ir.aiga.apps.quran.classes.FileOperations.copyFromAsset(FileOperations.java:112)
  26. 09-18 16:05:20.175: W/System.err(4219): at ir.aiga.apps.quran.MainActivity$ProgressHorizantol.doInBackground(MainActivity.java:732)
  27. 09-18 16:05:20.175: W/System.err(4219): at ir.aiga.apps.quran.MainActivity$ProgressHorizantol.doInBackground(MainActivity.java:1)
  28. 09-18 16:05:20.175: W/System.err(4219): at android.os.AsyncTask$2.call(AsyncTask.java:264)
  29. 09-18 16:05:20.175: W/System.err(4219): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
  30. 09-18 16:05:20.175: W/System.err(4219): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
  31. 09-18 16:05:20.186: W/System.err(4219): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
  32. 09-18 16:05:20.186: W/System.err(4219): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
  33. 09-18 16:05:20.186: W/System.err(4219): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
  34. 09-18 16:05:20.186: W/System.err(4219): at java.lang.Thread.run(Thread.java:856)
  35. 09-18 16:05:20.186: W/System.err(4219): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
  36. 09-18 16:05:20.186: W/System.err(4219): at libcore.io.Posix.open(Native Method)
  37. 09-18 16:05:20.186: W/System.err(4219): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
  38. 09-18 16:05:20.186: W/System.err(4219): at libcore.io.IoBridge.open(IoBridge.java:403)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement