Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.nio.channels
Class Channels  view Channels download Channels.java

java.lang.Object
  extended byjava.nio.channels.Channels

public final class Channels
extends java.lang.Object

Since:
1.4

Constructor Summary
private Channels()
          This class isn't intended to be instantiated.
 
Method Summary
static ReadableByteChannel newChannel(java.io.InputStream in)
          Constructs a channel that reads bytes from the given stream.
static WritableByteChannel newChannel(java.io.OutputStream out)
          Constructs a channel that writes bytes to the given stream.
static java.io.InputStream newInputStream(ReadableByteChannel ch)
          Constructs a stream that reads bytes from the given channel.
static java.io.OutputStream newOutputStream(WritableByteChannel ch)
          Constructs a stream that writes bytes to the given channel.
static java.io.Reader newReader(ReadableByteChannel ch, java.nio.charset.CharsetDecoder dec, int minBufferCap)
          Constructs a reader that decodes bytes from the given channel using the given decoder.
static java.io.Reader newReader(ReadableByteChannel ch, java.lang.String csName)
          Constructs a reader that decodes bytes from the given channel according to the named charset.
static java.io.Writer newWriter(WritableByteChannel ch, java.nio.charset.CharsetEncoder enc, int minBufferCap)
          Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.
static java.io.Writer newWriter(WritableByteChannel ch, java.lang.String csName)
          Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Channels

private Channels()
This class isn't intended to be instantiated.

Method Detail

newInputStream

public static java.io.InputStream newInputStream(ReadableByteChannel ch)
Constructs a stream that reads bytes from the given channel.


newOutputStream

public static java.io.OutputStream newOutputStream(WritableByteChannel ch)
Constructs a stream that writes bytes to the given channel.


newChannel

public static ReadableByteChannel newChannel(java.io.InputStream in)
Constructs a channel that reads bytes from the given stream.


newChannel

public static WritableByteChannel newChannel(java.io.OutputStream out)
Constructs a channel that writes bytes to the given stream.


newReader

public static java.io.Reader newReader(ReadableByteChannel ch,
                                       java.nio.charset.CharsetDecoder dec,
                                       int minBufferCap)
Constructs a reader that decodes bytes from the given channel using the given decoder.


newReader

public static java.io.Reader newReader(ReadableByteChannel ch,
                                       java.lang.String csName)
Constructs a reader that decodes bytes from the given channel according to the named charset.


newWriter

public static java.io.Writer newWriter(WritableByteChannel ch,
                                       java.nio.charset.CharsetEncoder enc,
                                       int minBufferCap)
Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.


newWriter

public static java.io.Writer newWriter(WritableByteChannel ch,
                                       java.lang.String csName)
Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.