Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. Toast.makeText(Main.this, "Method properly called.", Toast.LENGTH_SHORT).show();
  2. //The file variable to imported.
  3. File file;
  4.  
  5. try {
  6. //Sets the file equal to the file found at the specified path.
  7. //Used to access settings.
  8. TinyDB database = new TinyDB(getApplicationContext());
  9.  
  10. String strfilePath = database.getString("FilePath");
  11. Toast.makeText(Main.this, "Method properly called: " + strfilePath, Toast.LENGTH_SHORT).show();
  12. file = new File(strfilePath);
  13.  
  14. //To be used to arrange the imported information.
  15. ArrayList<String> strAcc = new ArrayList<>();
  16. ArrayList<String> strUser = new ArrayList<>();
  17. ArrayList<String> strPass = new ArrayList<>();
  18. ArrayList<String> strAdditionalInfo = new ArrayList<>();
  19.  
  20. //To be used to store all the information for additional info variables. This is
  21. //due to its multi-line nature requiring a slightly different method of
  22. //importation, the other variables are expected to be one line.
  23. String strExtraInfo = "";
  24.  
  25. //Goes through the file and adds info to arrays for each corresponding variable.
  26. //If the line does not have an identifier, it assumes it to be an additional
  27. //info line, and will be processed later.
  28. try (BufferedReader br = new BufferedReader(new FileReader(file))) { //Line 776, as mentioned in err log.
  29.  
  30. W/System.err: java.io.FileNotFoundException: /document/storage/emulated/0/Download/PSync.psbk (No such file or directory)
  31. 10-04 21:16:32.843 19405-19405/com.example.brand.psync W/System.err: at java.io.FileInputStream.open(Native Method)
  32. 10-04 21:16:32.843 19405-19405/com.example.brand.psync W/System.err: at java.io.FileInputStream.<init>(FileInputStream.java:146)
  33. 10-04 21:16:32.843 19405-19405/com.example.brand.psync W/System.err: at java.io.FileReader.<init>(FileReader.java:72)
  34. 10-04 21:16:32.843 19405-19405/com.example.brand.psync W/System.err: at com.example.brand.psync.Main.onRequestPermissionsResult(Main.java:776)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement