src/main/java/net/batchik/crdt/fiber/FiberChannels.java
/**
     * Constructs a writer that encodes characters using the given encoder and
     * writes the resulting bytes to the given channel.
     *
     * <p> The resulting stream will contain an internal output buffer of at
     * least <tt>minBufferCap</tt> bytes.  The stream's <tt>write</tt> methods
     * will, as needed, flush the buffer by writing bytes to the underlying
     * channel; if the channel is in non-blocking mode when bytes are to be
     * written then an {@link IllegalBlockingModeException} will be thrown.
     * The resulting stream will not otherwise be buffered.  Closing the stream
     * will in turn cause the channel to be closed.  </p>
     *
     * @param  ch
     *         The channel to which bytes will be written
     *
     * @param  enc
     *         The charset encoder 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 writer
     */
Constructs a writer that encodes characters using the given encoder and
writes the resulting bytes to the given channel.

 The resulting stream will contain an internal output buffer of at
least minBufferCap bytes.  The stream's write methods
will, as needed, flush the buffer by writing bytes to the underlying
channel; if the channel is in non-blocking mode when bytes are to be
written then an  IllegalBlockingModeException will be thrown.
The resulting stream will not otherwise be buffered.  Closing the stream
will in turn cause the channel to be closed.

@param  ch
The channel to which bytes will be written

@param  enc
The charset encoder 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 writer
Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel . The resulting stream will contain an internal output buffer of at least minBufferCap bytes . The stream ' s write methods will as needed flush the buffer by writing bytes to the underlying channel ; if the channel is in non - blocking mode when bytes are to be written then an IllegalBlockingModeException will be thrown . The resulting stream will not otherwise be buffered . Closing the stream will in turn cause the channel to be closed . @param ch The channel to which bytes will be written @param enc The charset encoder 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 writer
public static Writer newWriter(final WritableByteChannel ch,
                                   final CharsetEncoder enc,
                                   final int minBufferCap) throws SuspendExecution {
        checkNotNull(ch, "ch");
        return FiberStreamEncoder.forEncoder(ch, enc.reset(), minBufferCap);
    }
public static Writer newWriter ( final WritableByteChannel ch , final CharsetEncoder enc , final int minBufferCap ) throws SuspendExecution { checkNotNull ( ch , "ch" ) ; return FiberStreamEncoder . forEncoder ( ch , enc . reset ( ) , minBufferCap ) ; }
Constructs a writer that encodes characters using the given encoder and
 writes the resulting bytes to the given channel.
Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel .