|
NIO2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.classpath.icedtea.java.nio.channels.Channels
public final class Channels
Utility methods for channels and streams.
This class defines static methods that support the interoperation of the
stream classes of the java.io
package with the channel
classes of this package.
Method Summary | |
---|---|
static InputStream |
newInputStream(AsynchronousByteChannel ch)
Constructs a stream that reads bytes from the given channel. |
static OutputStream |
newOutputStream(AsynchronousByteChannel ch)
Constructs a stream that writes bytes to the given channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InputStream newInputStream(AsynchronousByteChannel ch)
The stream will not be buffered, and it will not support the mark
or reset
methods. The
stream will be safe for access by multiple concurrent threads. Closing
the stream will in turn cause the channel to be closed.
ch
- The channel from which bytes will be read
public static OutputStream newOutputStream(AsynchronousByteChannel ch)
The stream will not be buffered. The stream will be safe for access by multiple concurrent threads. Closing the stream will in turn cause the channel to be closed.
ch
- The channel to which bytes will be written
|
NIO2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007, 2011, Oracle and/or its affiliates. All rights reserved.