[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Mark Murphy
Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error: java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator You probably don't have a file at /data/testing.txt. My code is like that: FileInputStream

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Chandrakar Aravind-rqj386
To: android-developers@googlegroups.com Subject: [android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread kelly
error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error:       java.lang.IllegalArgumentException: File /data/testing.txt contains

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Mark Murphy
kelly wrote: You might try just using java.io.File, which works well for me: File file = new File(/whatever/path/to/file.txt); try { InputStream in = new FileInputStream(file); ... } catch(Exception ex) { ... } That works, so long as you have read access to whatever it is

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread kelly
Ah, that makes sense. What I'm doing with the java.io.File approach is reading/writing to/from areas on the sd card. On Dec 10, 10:38 am, Mark Murphy [EMAIL PROTECTED] wrote: kelly wrote: You might try just using java.io.File, which works well for me: File file = new

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread enervatron
On Wed, Dec 10, 2008 at 8:38 AM, Mark Murphy [EMAIL PROTECTED] wrote: openFileInput() gives you a storage spot unique to your application in the on-board flash. It is not for use for, say, accessing /sdcard. This brings up a question I have: is there an etiquette for apps putting stuff on the

[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator

2008-12-10 Thread Michael
I noticed that lots of apps have been making a mess of my SD card. So when I had to store some data there, I made the decision to keep things cleaner. The path I used is /var/MyProgramName/ and then various directories below. --~--~-~--~~~---~--~~ You received