Java NIO example.