Team LiB
Previous Section Next Section

Pipe.SinkChanneljava.nio.channels

Java 1.4closeable

This public inner class is represents the write end of a pipe. Bytes written to a Pipe.SinkChannel become available on the corresponding Pipe.SourceChannel of the pipe. Obtain a Pipe.SinkChannel by creating a Pipe object with Pipe.open( ) and then calling the sink( ) method of that object. See also the containing Pipe class.

Pipe.SinkChannel implements WritableByteChannel and GatheringByteChannel and defines the write( ) methods of those interfaces. This class subclasses SelectableChannel, so that it can be used with a Selector. It overrides the abstract validOps( ) method of SelectableChannel to return SelectionKey.OP_WRITE, but defines no new methods of its own.

public abstract static class Pipe.SinkChannel extends java.nio.channels.spi.
AbstractSelectableChannel implements GatheringByteChannel, WritableByteChannel {
// Protected Constructors
     protected SinkChannel(java.nio.channels.spi.SelectorProvider provider);  
// Public Methods Overriding SelectableChannel
     public final int validOps( );        constant
}

Returned By

Pipe.sink( )

    Team LiB
    Previous Section Next Section