I got the prob that I cant write to my local filesystem in Android,
cause I dont have the "permission" for that... even if I know there's no setting in the manifest for that..
I always get "Parent directory of file is not writable: /sdcard/myfile"
my code: (even if I dont think its because of that:
Using java Syntax Highlighting
- InputStream oIn = oFile.getAsStream();
- FileOutputStream oOut = null;
- try
- {
- File oNewFile = new File(m_strAbsolutePath +"/"+ oFile.getName());
- oNewFile.createNewFile();
- oOut = new FileOutputStream(oNewFile);
- return new StreamCopier().copy(oIn, oOut) == oFile.getSize(); //copy inputstream into outputstream
- }
- catch (...)
- {
- ...
- }
- finally
- {
- try
- {
- if(oOut != null)
- oOut.close();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
Parsed in 0.034 seconds, using GeSHi 1.0.8.4


