myOpenFile.checkWritable(runtime);
Stream writeStream = myOpenFile.getWriteStream();
writeStream.fflush();
writeStream.sync();
} catch (InvalidValueException ex) {
throw runtime.newErrnoEINVALError();
} catch (IOException e) {
throw runtime.newIOErrorFromException(e);