1. Flush () in Java: Forces data from the output stream buffer to be sent out.
2. File storage:
Store to internal: Another class implementation, the initial initialization of the use of this, and then placed here is not appropriate, changed to a construction method with parameters.
Includes storage, read, append
READ: In addition to using the Setxxx method, for security reasons, using Google API Sharedpreferre directly save the data, the next time you can also be directly extracted. This interface to be used with the editor, must Editor.commit (), this is to prevent the input name is OK, the input pwd time is abnormal, to ensure that the whole process is a transaction, together commit. (The Java web is playing the same way). This interface is stored in XML format, which is the shared_perfs.xml that is visible everywhere!!! Gets the contents of the XML file, Sp.getboolean (key,value), originally stored in the XML file is the <map> method, that is, the key value pair!
External: Add write to SD card permissions in the manifest file. Tips: How do I get sdcard size? Environment class does not provide methods, we know settings inside can get, so download Android source code, import settings package, from the Chinese "Total capacity" search, and then find the implementation method: Getblocksize* Totalblockcount
Sqlite