Java: make a file world readable (chmod 666)
File myfile = new File("/home/myfile.txt");
myfile.setExecutable(boolean executable, boolean ownerOnly);
And for checking:
This works on any JVM.
It also works on Android when you have permission (a different kind of permission).
If you want to set permission by owner, user, group use