# Pipe.SourceChannel

public static abstract class **Pipe.SourceChannel** extends [AbstractSelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html)  
implements [ReadableByteChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ReadableByteChannel.html) [ScatteringByteChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ScatteringByteChannel.html) A channel representing the readable end of a `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Pipe.html`.

### Protected Constructor Summary

|---|---|
|   | [SourceChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Pipe.SourceChannel.html#SourceChannel(java.nio.channels.spi.SelectorProvider))([SelectorProvider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/SelectorProvider.html) provider) Constructs a new instance of this class. |

### Public Method Summary

|---|---|
| final int | [validOps](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Pipe.SourceChannel.html#validOps())() Returns an operation set identifying this channel's supported operations. |

### Inherited Method Summary

From class [java.nio.channels.spi.AbstractSelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html)

|---|---|
| final [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [blockingLock](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#blockingLock())() Retrieves the object upon which the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#configureBlocking(boolean)` and `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#register(java.nio.channels.Selector,%20int)` methods synchronize. |
| final [SelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html) | [configureBlocking](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#configureBlocking(boolean))(boolean block) Adjusts this channel's blocking mode. |
| final void | [implCloseChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#implCloseChannel())() Closes this channel. |
| abstract void | [implCloseSelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#implCloseSelectableChannel())() Closes this selectable channel. |
| abstract void | [implConfigureBlocking](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#implConfigureBlocking(boolean))(boolean block) Adjusts this channel's blocking mode. |
| final boolean | [isBlocking](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#isBlocking())() Tells whether or not every I/O operation on this channel will block until it completes. |
| final boolean | [isRegistered](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#isRegistered())() Tells whether or not this channel is currently registered with any selectors. |
| final [SelectionKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html) | [keyFor](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#keyFor(java.nio.channels.Selector))([Selector](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Selector.html) sel) Retrieves the key representing the channel's registration with the given selector. |
| final [SelectorProvider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/SelectorProvider.html) | [provider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#provider())() Returns the provider that created this channel. |
| final [SelectionKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html) | [register](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractSelectableChannel.html#register(java.nio.channels.Selector,%20int,%20java.lang.Object))([Selector](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Selector.html) sel, int ops, [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) att) Registers this channel with the given selector, returning a selection key. |

From class [java.nio.channels.SelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html)

|---|---|
| abstract [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [blockingLock](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#blockingLock())() Retrieves the object upon which the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#configureBlocking(boolean)` and `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#register(java.nio.channels.Selector,%20int)` methods synchronize. |
| abstract [SelectableChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html) | [configureBlocking](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#configureBlocking(boolean))(boolean block) Adjusts this channel's blocking mode. |
| abstract boolean | [isBlocking](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#isBlocking())() Tells whether or not every I/O operation on this channel will block until it completes. |
| abstract boolean | [isRegistered](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#isRegistered())() Tells whether or not this channel is currently registered with any selectors. |
| abstract [SelectionKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html) | [keyFor](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#keyFor(java.nio.channels.Selector))([Selector](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Selector.html) sel) Retrieves the key representing the channel's registration with the given selector. |
| abstract [SelectorProvider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/SelectorProvider.html) | [provider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#provider())() Returns the provider that created this channel. |
| abstract [SelectionKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html) | [register](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#register(java.nio.channels.Selector,%20int,%20java.lang.Object))([Selector](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Selector.html) sel, int ops, [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) att) Registers this channel with the given selector, returning a selection key. |
| final [SelectionKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html) | [register](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#register(java.nio.channels.Selector,%20int))([Selector](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Selector.html) sel, int ops) Registers this channel with the given selector, returning a selection key. |
| abstract int | [validOps](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectableChannel.html#validOps())() Returns an [operation set](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey#opsets) identifying this channel's supported operations. |

From class [java.nio.channels.spi.AbstractInterruptibleChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html)

|---|---|
| final void | [begin](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html#begin())() Marks the beginning of an I/O operation that might block indefinitely. |
| final void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html#close())() Closes this channel. |
| final void | [end](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html#end(boolean))(boolean completed) Marks the end of an I/O operation that might block indefinitely. |
| abstract void | [implCloseChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html#implCloseChannel())() Closes this channel. |
| final boolean | [isOpen](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/AbstractInterruptibleChannel.html#isOpen())() Tells whether or not this channel is open. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [java.nio.channels.Channel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Channel.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Channel.html#close())() Closes this channel. |
| abstract boolean | [isOpen](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/Channel.html#isOpen())() Tells whether or not this channel is open. |

From interface [java.nio.channels.InterruptibleChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/InterruptibleChannel.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/InterruptibleChannel.html#close())() Closes this channel. |

From interface [java.nio.channels.ReadableByteChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ReadableByteChannel.html)

|---|---|
| abstract int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ReadableByteChannel.html#read(java.nio.ByteBuffer))([ByteBuffer](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) dst) Reads a sequence of bytes from this channel into the given buffer. |

From interface [java.nio.channels.ScatteringByteChannel](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ScatteringByteChannel.html)

|---|---|
| abstract long | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ScatteringByteChannel.html#read(java.nio.ByteBuffer[],%20int,%20int))([ByteBuffer\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) dsts, int offset, int length) Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
| abstract long | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/ScatteringByteChannel.html#read(java.nio.ByteBuffer[]))([ByteBuffer\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/ByteBuffer.html) dsts) Reads a sequence of bytes from this channel into the given buffers. |

From interface [java.io.Closeable](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Closeable.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Closeable.html#close())() Closes this stream and releases any system resources associated with it. |

From interface [java.lang.AutoCloseable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/AutoCloseable.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/AutoCloseable.html#close())() Closes this resource, relinquishing any underlying resources. |

## Protected Constructors

#### protected
**SourceChannel**
([SelectorProvider](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/spi/SelectorProvider.html) provider)

Constructs a new instance of this class.

##### Parameters

| provider | The selector provider |
|---|---|

## Public Methods

#### public final int
**validOps**
()

Returns an operation set identifying this channel's supported
operations.

Pipe-source channels only support reading, so this method
returns `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/SelectionKey.html#OP_READ`.

<br />

##### Returns

- The valid-operation set