f.delete();
fos = new FileOutputStream(f.getPath());
fos.write("Test String".getBytes());
fis = new FileInputStream(f.getPath());
FileDescriptor fd = fos.getFD();
fd.sync();
int length = "Test String".length();
assertEquals("Bytes were not written after sync", length, fis
.available());
// Regression test for Harmony-1494