up to Java 7 + use nio API
Merge remote-tracking branch 'origin/master'