Here's a decent example of how to fsync() from Java: http://android-developers.blogspot.com/2010/12/saving-data-safely.html.
Note that if using buffered I/O then you also need to flush the data before the sync().
Here's a decent example of how to fsync() from Java: http:// android- developers. blogspot. com/2010/ 12/saving- data-safely. html.
Note that if using buffered I/O then you also need to flush the data before the sync().