문제

I read some files from phone storage (which are in Russian name) i listed all files it will give me all file path correct but the time when i try to read from new FileInputStream(file) it gave me file not found exception i don't know why. my code is like the following :

FileInputStream file1 = new FileInputStream(file); //this line gave error and file path is /storage/emulated/0/bhanuдосвидания.txt 

and logcat is the following :

02-10 15:48:58.000: W/System.err(16013): java.io.FileNotFoundException: /storage/emulated/0/bhanuдосвидания.txt: open failed: ENOENT (No such file or directory) 02-10 15:48:58.020: W/System.err(16013): at libcore.io.IoBridge.open(IoBridge.java:409) 02-10 15:48:58.050: W/System.err(16013): at java.io.FileInputStream.<init>(FileInputStream.java:78) 02-10 15:48:58.050: W/System.err(16013): at com.S3Upload.UploadActivity$allCalculation.doInBackground(UploadActivity.java:16‌​71) 02-10 15:48:58.080: W/System.err(16013): 

please help me...

도움이 되었습니까?

해결책

May be the problem is like you change your file name to lower case. Try to remove lower case from your code and check.

다른 팁

please try to do something like the following :

BufferedReader in = new BufferedReader(
           new InputStreamReader(
                      new FileInputStream(file), "UTF8"));

and give me some feedback

Hope that helps .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top