src/main/java/net/batchik/crdt/fiber/FiberChannels.java
/**
     * Constructs a reader that decodes bytes from the given channel using the
     * given decoder.
     *
     * <p> The resulting stream will contain an internal input buffer of at
     * least <tt>minBufferCap</tt> bytes.  The stream's <tt>read</tt> methods
     * will, as needed, fill the buffer by reading bytes from the underlying
     * channel; if the channel is in non-blocking mode when bytes are to be
     * read then an {@link IllegalBlockingModeException} will be thrown.  The
     * resulting stream will not otherwise be buffered, and it will not support
     * the {@link Reader#mark mark} or {@link Reader#reset reset} methods.
     * Closing the stream will in turn cause the channel to be closed.  </p>
     *
     * @param  ch
     *         The channel from which bytes will be read
     *
     * @param  dec
     *         The charset decoder to be used
     *
     * @param  minBufferCap
     *         The minimum capacity of the internal byte buffer,
     *         or <tt>-1</tt> if an implementation-dependent
     *         default capacity is to be used
     *
     * @return  A new reader
     */
Constructs a reader that decodes bytes from the given channel using the
given decoder.

 The resulting stream will contain an internal input buffer of at
least minBufferCap bytes.  The stream's read methods
will, as needed, fill the buffer by reading bytes from the underlying
channel; if the channel is in non-blocking mode when bytes are to be
read then an  IllegalBlockingModeException will be thrown.  The
resulting stream will not otherwise be buffered, and it will not support
the  Reader#mark mark or  Reader#reset reset methods.
Closing the stream will in turn cause the channel to be closed.

@param  ch
The channel from which bytes will be read

@param  dec
The charset decoder to be used

@param  minBufferCap
The minimum capacity of the internal byte buffer,
or -1 if an implementation-dependent
default capacity is to be used

@return  A new reader
Constructs a reader that decodes bytes from the given channel using the given decoder . The resulting stream will contain an internal input buffer of at least minBufferCap bytes . The stream ' s read methods will as needed fill the buffer by reading bytes from the underlying channel ; if the channel is in non - blocking mode when bytes are to be read then an IllegalBlockingModeException will be thrown . The resulting stream will not otherwise be buffered and it will not support the Reader#mark mark or Reader#reset reset methods . Closing the stream will in turn cause the channel to be closed . @param ch The channel from which bytes will be read @param dec The charset decoder to be used @param minBufferCap The minimum capacity of the internal byte buffer or - 1 if an implementation - dependent default capacity is to be used @return A new reader
public static Reader newReader(ReadableByteChannel ch,
                                   CharsetDecoder dec,
                                   int minBufferCap) throws SuspendExecution {
        checkNotNull(ch, "ch");
        return FiberStreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
    }
public static Reader newReader ( ReadableByteChannel ch , CharsetDecoder dec , int minBufferCap ) throws SuspendExecution { checkNotNull ( ch , "ch" ) ; return FiberStreamDecoder . forDecoder ( ch , dec . reset ( ) , minBufferCap ) ; }
Constructs a reader that decodes bytes from the given channel using the
 given decoder.
Constructs a reader that decodes bytes from the given channel using the given decoder .