Hi!
I've read most available post for this exception with openFileOutput,
and it seem to be a common issue. Though, i can't find a solution.
This code throughs a FileNotFoundException on the row "fos =
openFileOutput(fil, Context.MODE_PRIVATE);". Why? I can't figure it
out. Thanks!


import java.io.FileOutputStream;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
public class firstActivity extends Activity {
        public firstActivity(){
        }
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.maininterface);


                String fil = "test2";
                String string = "exempeltext";

                FileOutputStream fos;

                fos = openFileOutput(fil, Context.MODE_PRIVATE);

                fos.write(string.getBytes());
                fos.close();
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to