Add java-dir and FileOutputStream example, which is used to write to file.