English | Site Directory

Android - An Open Handset Alliance Project

java.nio.channels
public abstract class

java.nio.channels.Pipe

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

A pipe contains two channels. One is the writable sink channel and the other is readable source channel. When bytes are written into the writable channel they can be read from readable channel. The order of these bytes remains unchanged.

Nested Classes
Pipe.SinkChannel Writable sink channel for writing into. 
Pipe.SourceChannel Readable source channel for reading from. 

Summary

Protected Constructors

          Pipe()
The protected constructor.

Public Methods

      static  Pipe  open()
Initializes a pipe.
abstract        SinkChannel  sink()
Returns the sink channel of the pipe.
abstract        SourceChannel  source()
Returns the source channel of the pipe.
Methods inherited from class java.lang.Object

Details

Protected Constructors

protected Pipe()

The protected constructor.

Public Methods

public static Pipe open()

Initializes a pipe.

Returns

  • a new instance of pipe

Throws

IOException if I/O error occurs

public abstract SinkChannel sink()

Returns the sink channel of the pipe.

Returns

  • a writable sink channel of the pipe

public abstract SourceChannel source()

Returns the source channel of the pipe.

Returns

  • a readable source channel of the pipe
Build m5-rc15i - 10 Jun 2008 13:54