Code example of java nio.