Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Pipe

public abstract class Pipe
extends Object

java.lang.Object
   ↳ java.nio.channels.Pipe


A pipe contains two channels, forming a unidirectional pipe. One is the writable sink channel, and the other is the readable source channel. When bytes are written into the writable channel they can be read from the readable channel. Bytes are read in the order in which they were written.

Summary

Nested classes

class Pipe.SinkChannel

Writable sink channel used to write to a pipe. 

class Pipe.SourceChannel

Readable source channel used to read from a pipe. 

Protected constructors

Pipe()

The protected default constructor.

Public methods

static Pipe open()

Returns a new pipe from the default .

abstract Pipe.SinkChannel sink()

Returns the sink channel of the pipe.

abstract Pipe.SourceChannel source()

Returns the source channel of the pipe.

Inherited methods

From class java.lang.Object

Protected constructors

Pipe

Added in API level 1
Pipe ()

The protected default constructor.

Public methods

open

Added in API level 1
Pipe open ()

Returns a new pipe from the default .

Returns
Pipe
Throws
IOException if an I/O error occurs.

See also:

sink

Added in API level 1
Pipe.SinkChannel sink ()

Returns the sink channel of the pipe.

Returns
Pipe.SinkChannel a writable sink channel of the pipe.

source

Added in API level 1
Pipe.SourceChannel source ()

Returns the source channel of the pipe.

Returns
Pipe.SourceChannel a readable source channel of the pipe.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.