| Package | Description |
|---|---|
| java.nio.channels |
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ByteChannel
A channel that can read and write bytes.
|
interface |
GatheringByteChannel
A channel that can write bytes from a sequence of buffers.
|
interface |
SeekableByteChannel
A byte channel that maintains a current
position and allows the position to be changed.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DatagramChannel
A selectable channel for datagram-oriented sockets.
|
class |
FileChannel
A channel for reading, writing, mapping, and manipulating a file.
|
static class |
Pipe
A channel representing the writable end of a
Pipe.
|
class |
SocketChannel
A selectable channel for stream-oriented connecting sockets.
|
| Modifier and Type | Method and Description |
|---|---|
static WritableByteChannel |
Channels.newChannel(OutputStream
Constructs a channel that writes bytes to the given stream.
|
| Modifier and Type | Method and Description |
|---|---|
static OutputStream |
Channels.newOutputStream(WritableByteChannel
Constructs a stream that writes bytes to the given channel.
|
static Writer |
Channels.newWriter(WritableByteChannel
Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.
|
static Writer |
Channels.newWriter(WritableByteChannel
Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.
|
abstract long |
FileChannel.transferTo(long position, long count, WritableByteChannel
Transfers bytes from this channel's file to the given writable byte channel.
|