Check a File Existence and Read/Write it

While developing a app, I used internal storage to save a file.

  1. Firstly, I needed to check a file existence. For me, this worked. (https://stackoverflow.com/questions/8867334/check-if-a-file-exists-before-calling-openfileinput)
    I used like this but it didn’t work. In my thought, it is because I called it in another thread and it made a problem.
  2. There are some functions to do read/write. This page helped me to decide which to use.
    (https://stackoverflow.com/questions/11371154/outputstreamwriter-vs-filewriter)
  3. Finally, this page solved my problem. It was also related to the thread as I thought.
    (https://stackoverflow.com/questions/14376807/how-to-read-write-string-from-a-file-in-android)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s