Context.mode_private: As the default mode of operation, which means that the file is private data and can only be accessed by the app itself, in which the content of the write overwrites the contents of the original file, if you want to append the newly written content to the original file. You can use Context.mode_append
Context.mode_append: The mode checks whether the file exists, appends content to the file, or creates a new file.
Context.mode_world_readable and context.mode_world_writeable are used to control whether other apps have permission to read and write to the file.
Mode_world_readable: Indicates that the current file can be read by another application;
Mode_world_writeable: Indicates that the current file can be written by another application.
If you want the file to be read and written by another app, you can pass in:
Openfileoutput ("Itcast.txt", context.mode_world_readable + context.mode_world_writeable);
Android has its own security model, and when the application (. apk) is installed, the system assigns him a userid, which requires a UserID match when the app is going to access other resources such as files.
By default, any file created by the app, Sharedpreferences, should be private (in/data/data/<packagename>/files) and other programs cannot access it.
Unless you specify context.mode_world_readable or context.mode_world_writeable at creation time, only such other programs can access them correctly.
Context.mode_private = 0
Context.mode_append = 32768
context.mode_world_readable = 1
Context.mode_world_writeable = 2
Http://www.cnblogs.com/jqyp/archive/2010/09/13/1825249.html
Four modes of Android Context mode parsing (RPM)