Reading data from a file is very similar to writing data.
Call theĀ FileInputStream.read() method to read all data from that file.
Finally, call theĀ FileInputStream.close() method to close the input stream after the reading task completed.
Below is the demo application for this post:
When user hit the Save button, the application will save the text in EditText to file in device.
And when the Load button was hit, it will load all data from file to TextView on the screen.
http://www.mediafire.com/?mb6amzm2kta8s4w
Comments powered by Disqus.