@@ -0,0 +1,2354 @@
+package com.github.booknara.nioexample;%0A%0Aimport java.io.IOException;%0Aimport java.nio.ByteBuffer;%0Aimport java.nio.channels.AsynchronousFileChannel;%0Aimport java.nio.channels.CompletionHandler;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.nio.file.StandardOpenOption;%0A%0A/**%0A * Created by Daehee Han(@daniel_booknara) on 2/16/16.%0A */%0Apublic class AsynchronousFileChannelExample %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        // Reading an operation%0A        Path readFilePath = Paths.get(%22.%22, %22colors.xml%22);%0A%0A        AsynchronousFileChannel readFileChannel = AsynchronousFileChannel.open(readFilePath, StandardOpenOption.READ);%0A        ByteBuffer readBuffer = ByteBuffer.allocate(1024);%0A        readBuffer.clear();%0A%0A        readFileChannel.read(readBuffer, 0, readBuffer, new CompletionHandler%3CInteger, ByteBuffer%3E() %7B%0A            @Override%0A            public void completed(Integer result, ByteBuffer attachment) %7B%0A                System.out.println(%22Result = %22 + result);%0A%0A                attachment.flip();%0A                byte%5B%5D data = new byte%5Battachment.limit()%5D;%0A                attachment.get(data);%0A                System.out.println(%22Read String : %22 + new String(data));%0A                attachment.clear();%0A            %7D%0A%0A            @Override%0A            public void failed(Throwable exc, ByteBuffer attachment) %7B%0A%0A            %7D%0A        %7D);%0A%0A        Path writeFilePath = Paths.get(%22.%22, %22file-write.txt%22);%0A        if (!Files.exists(writeFilePath)) %7B%0A            Files.createFile(writeFilePath);%0A        %7D%0A%0A        AsynchronousFileChannel writeFileChannel = AsynchronousFileChannel.open(writeFilePath, StandardOpenOption.WRITE);%0A        ByteBuffer writeBuffer = ByteBuffer.allocate(1024);%0A        writeBuffer.clear();%0A        String text = %22New write text%22;%0A%0A        writeBuffer.put(text.getBytes());%0A        writeBuffer.flip();%0A%0A        writeFileChannel.write(writeBuffer, 0, writeBuffer, new CompletionHandler%3CInteger, ByteBuffer%3E() %7B%0A            @Override%0A            public void completed(Integer result, ByteBuffer attachment) %7B%0A                System.out.println(%22byte lengh : %22 + result);%0A            %7D%0A%0A            @Override%0A            public void failed(Throwable exc, ByteBuffer attachment) %7B%0A%0A            %7D%0A        %7D);%0A%0A        while (true) %7B%0A%0A        %7D%0A    %7D%0A%7D%0A

Add AsynchronousFileChannelExample file