src/main/java/net/batchik/crdt/fiber/FiberChannels.java
/**
     * Constructs a channel that writes bytes to the given stream.
     *
     * <p> The resulting channel will not be buffered; it will simply redirect
     * its I/O operations to the given stream.  Closing the channel will in
     * turn cause the stream to be closed.  </p>
     *
     * @param  out
     *         The stream to which bytes are to be written
     *
     * @return  A new writable byte channel
     */
Constructs a channel that writes bytes to the given stream.
 The resulting channel will not be buffered; it will simply redirect
its I/O operations to the given stream.  Closing the channel will in
turn cause the stream to be closed.

@param  out
The stream to which bytes are to be written

@return  A new writable byte channel
Constructs a channel that writes bytes to the given stream . The resulting channel will not be buffered ; it will simply redirect its I / O operations to the given stream . Closing the channel will in turn cause the stream to be closed . @param out The stream to which bytes are to be written @return A new writable byte channel
public static WritableByteChannel newChannel(final OutputStream out) throws SuspendExecution {
        checkNotNull(out, "out");
        if (out instanceof FileOutputStream &&
                FileOutputStream.class.equals(out.getClass())) {
            return ((FileOutputStream)out).getChannel();
        }
        return new WritableByteChannelImpl(out);
    }
public static WritableByteChannel newChannel ( final OutputStream out ) throws SuspendExecution { checkNotNull ( out , "out" ) ; if ( out instanceof FileOutputStream && FileOutputStream . class . equals ( out . getClass ( ) ) ) { return ( ( FileOutputStream ) out ) . getChannel ( ) ; } return new WritableByteChannelImpl ( out ) ; }
Constructs a channel that writes bytes to the given stream.
Constructs a channel that writes bytes to the given stream .