FileOutputStream
A FileOutputStream is used to write data to a file.
Example:
public boolean writeFileToPrivateFile(String filename, String theData)
{
FileOutputStream fOut = null;
OutputStreamWriter osw = null;
try
{
fOut = openFileOutput(filename, Context.MODE_PRIVATE);
osw = new OutputStreamWriter(fOut);
osw.write(theData);
osw.close();
fOut.close();
}
catch(Exception e)
{
return false;
}
return true;
}