package pw.koj.jetstreem.core;

import java.io.*;
import java.nio.channels.SelectableChannel;

public class InputPipeThread extends Thread {
    private InputStream in;
    private SelectableChannel ch;

    public InputPipeThread(InputStream in, SelectableChannel ch) {
        this.in = in;
        this.ch = ch;
    }

    public void run() {

    }
}


@@ -63,27 +63,54 @@
 nio.
-channels.Selectable
+ByteBuffer;%0Aimport java.nio.channels.Pipe.Sink
 Chan
@@ -202,25 +202,19 @@
 rivate S
-electable
+ink
 Channel 
@@ -266,17 +266,11 @@
 n, S
-electable
+ink
 Chan
@@ -354,16 +354,574 @@
 run() %7B%0A
+        try %7B%0A            try %7B%0A                byte%5B%5D buf = new byte%5B4096%5D;%0A                ByteBuffer bbuf = ByteBuffer.wrap(buf);%0A                int len;%0A                while ((len = this.in.read(buf)) %3E 0) %7B%0A                    bbuf.rewind();%0A                    bbuf.limit(len);%0A                    this.ch.write(bbuf);%0A                %7D%0A            %7D finally %7B%0A                this.in.close();%0A                this.ch.close();%0A            %7D%0A        %7D catch (IOException e) %7B%0A            System.err.println(%22IOException: %22 + e.getMessage());%0A        %7D
 %0A    %7D%0A%7D

add run() to class InpuPipeThread