Examples to understand JAVA NIO