Hi Mark,
   Thanks for the reply. I have gone through the web page which you
forwarded.
   It seems like, the article is related to file output on to a
desktop.
   But, I need something specific to Android, where I can print my
data onto a temporary file on android.

I was trying the following code:

public class Packager extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        FileOutputStream foStream;
            PrintStream pStream;

                try {
                         foStream = 
getBaseContext().openFileOutput("myfile.txt", 0);
                         pStream = new PrintStream(foStream);
                         pStream.print("This content has been printed");

                } catch (FileNotFoundException e) {
                        // TODO Auto-generated catch block

                }
    }
}

Please let me know if anything is wrong in the above code.

Thanks,
Venkata

-- 
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