Added java nio example.