@@ -0,0 +1,1315 @@
+package com.github.booknara.nioexample;%0A%0Aimport java.io.IOException;%0Aimport java.nio.ByteBuffer;%0Aimport java.nio.channels.Pipe;%0A%0A/**%0A * Created by Daehee Han(@daniel_booknara) on 2/16/16.%0A */%0Apublic class PipeExample %7B%0A    public static void main(String%5B%5D args) throws IOException%7B%0A        Pipe pipe = Pipe.open();%0A%0A        Pipe.SinkChannel sinkChannel = pipe.sink();%0A%0A        String text = %22This is a text%22;%0A%0A        ByteBuffer buffer = ByteBuffer.allocate(48);%0A        buffer.clear();%0A%0A        buffer.put(text.getBytes());%0A        System.out.println(%22Length : %22 + text.getBytes().length);%0A        System.out.println(%22Buffer Limit : %22 + buffer.limit());%0A%0A        while (buffer.hasRemaining()) %7B%0A            int length = sinkChannel.write(buffer);%0A            System.out.println(%22Write length : %22 + length);%0A        %7D%0A%0A        Pipe.SourceChannel sourceChannel = pipe.source();%0A        buffer = ByteBuffer.allocate(48);%0A%0A        int bytesRead = sourceChannel.read(buffer);%0A        System.out.println(%22Read length : %22 + bytesRead);%0A%0A//        while (sourceChannel.read(buffer) %3E 0) %7B%0A//            buffer.flip();%0A//%0A//            while (buffer.hasRemaining()) %7B%0A//                char ch = buffer.getChar();%0A//                System.out.print(ch);%0A//            %7D%0A//%0A//            buffer.clear();%0A//        %7D%0A    %7D%0A%7D%0A

Add PipeExample file