| 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.
|
| java.util |
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ByteChannel
A channel that can read and write bytes.
|
interface |
ScatteringByteChannel
A channel that can read bytes into 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 readable end of a
Pipe.
|
class |
SocketChannel
A selectable channel for stream-oriented connecting sockets.
|
| Modifier and Type | Method and Description |
|---|---|
static ReadableByteChannel |
Channels.newChannel(InputStream
Constructs a channel that reads bytes from the given stream.
|
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
Channels.newInputStream(ReadableByteChannel
Constructs a stream that reads bytes from the given channel.
|
static Reader |
Channels.newReader(ReadableByteChannel
Constructs a reader that decodes bytes from the given channel using the given decoder.
|
static Reader |
Channels.newReader(ReadableByteChannel
Constructs a reader that decodes bytes from the given channel according to the named charset.
|
abstract long |
FileChannel.transferFrom(ReadableByteChannel
Transfers bytes into this channel's file from the given readable byte channel.
|
| Constructor and Description | |
|---|---|
Scanner(ReadableByteChannel
Constructs a new
Scanner that produces values scanned from the specified channel.
|
|
Scanner(ReadableByteChannel
Constructs a new
Scanner that produces values scanned from the specified channel.
|