This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
java.nio.channels
class Pipe
-
Most common way to construct:
-
Pipe pipe = Pipe.open();
Based on 14 examples
public abstract class Pipe
extends Object
A pair of channels that implements a unidirectional pipe.
A pipe consists of a pair of channels: A writable {@link
Pipe.SinkChannel sink} channel and a readable {@link
Pipe.SourceChannel
source} channel. Once some bytes are
written to the sink channel they can be read from source channel in exactly
the order in which they were written.
Whether or not a thread writing bytes to a pipe will block until another
thread reads those bytes, or some previously-written bytes, from the pipe is
system-dependent and therefore unspecified. Many pipe implementations will
buffer up to a certain number of bytes between the sink and source channels,
but such buffering should not be assumed.
Nested Class Summary |
abstract static class |
A channel representing the writable end of a java.nio.channels.Pipe. |
abstract static class |
A channel representing the readable end of a java.nio.channels.Pipe. |
Constructor Summary |
protected |
Initializes a new instance of this class.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pipe
protected Pipe()
-
Initializes a new instance of this class.
open
public static Pipe open()
throws IOException
-
Opens a pipe.
The new pipe is created by invoking the {@link
java.nio.channels.spi.SelectorProvider#openPipe openPipe} method of the
system-wide default {@link java.nio.channels.spi.SelectorProvider}
object.
- Returns:
- A new pipe
- Throws:
IOException
- If an I/O error occurs
sink
public abstract Pipe.SinkChannel sink()
-
Returns this pipe's sink channel.
- Returns:
- This pipe's sink channel
source
public abstract Pipe.SourceChannel source()
-
Returns this pipe's source channel.
- Returns:
- This pipe's source channel
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.