Package java.nio.channels

Interface Summary
ByteChannel sample code for java.nio.channels.ByteChannel definition code for java.nio.channels.ByteChannel A channel that can read and write bytes.
Channel sample code for java.nio.channels.Channel definition code for java.nio.channels.Channel A nexus for I/O operations.
GatheringByteChannel sample code for java.nio.channels.GatheringByteChannel definition code for java.nio.channels.GatheringByteChannel A channel that can write bytes from a sequence of buffers.
InterruptibleChannel sample code for java.nio.channels.InterruptibleChannel definition code for java.nio.channels.InterruptibleChannel A channel that can be asynchronously closed and interrupted.
ReadableByteChannel sample code for java.nio.channels.ReadableByteChannel definition code for java.nio.channels.ReadableByteChannel A channel that can read bytes.
ScatteringByteChannel sample code for java.nio.channels.ScatteringByteChannel definition code for java.nio.channels.ScatteringByteChannel A channel that can read bytes into a sequence of buffers.
WritableByteChannel sample code for java.nio.channels.WritableByteChannel definition code for java.nio.channels.WritableByteChannel A channel that can write bytes.
 

Class Summary
Channels sample code for java.nio.channels.Channels definition code for java.nio.channels.Channels Utility methods for channels and streams.
DatagramChannel sample code for java.nio.channels.DatagramChannel definition code for java.nio.channels.DatagramChannel A selectable channel for datagram-oriented sockets.
FileChannel sample code for java.nio.channels.FileChannel definition code for java.nio.channels.FileChannel A channel for reading, writing, mapping, and manipulating a file.
FileChannel.MapMode sample code for java.nio.channels.FileChannel.MapMode definition code for java.nio.channels.FileChannel.MapMode A typesafe enumeration for file-mapping modes.
FileLock sample code for java.nio.channels.FileLock definition code for java.nio.channels.FileLock A token representing a lock on a region of a file.
Pipe sample code for java.nio.channels.Pipe definition code for java.nio.channels.Pipe A pair of channels that implements a unidirectional pipe.
Pipe.SinkChannel sample code for java.nio.channels.Pipe.SinkChannel definition code for java.nio.channels.Pipe.SinkChannel A channel representing the writable end of a Pipe sample code for java.nio.channels.Pipe definition code for java.nio.channels.Pipe .
Pipe.SourceChannel sample code for java.nio.channels.Pipe.SourceChannel definition code for java.nio.channels.Pipe.SourceChannel A channel representing the readable end of a Pipe sample code for java.nio.channels.Pipe definition code for java.nio.channels.Pipe .
SelectableChannel sample code for java.nio.channels.SelectableChannel definition code for java.nio.channels.SelectableChannel A channel that can be multiplexed via a Selector sample code for java.nio.channels.Selector definition code for java.nio.channels.Selector .
SelectionKey sample code for java.nio.channels.SelectionKey definition code for java.nio.channels.SelectionKey A token representing the registration of a SelectableChannel sample code for java.nio.channels.SelectableChannel definition code for java.nio.channels.SelectableChannel with a Selector sample code for java.nio.channels.Selector definition code for java.nio.channels.Selector .
Selector sample code for java.nio.channels.Selector definition code for java.nio.channels.Selector A multiplexor of SelectableChannel sample code for java.nio.channels.SelectableChannel definition code for java.nio.channels.SelectableChannel objects.
ServerSocketChannel sample code for java.nio.channels.ServerSocketChannel definition code for java.nio.channels.ServerSocketChannel A selectable channel for stream-oriented listening sockets.
SocketChannel sample code for java.nio.channels.SocketChannel definition code for java.nio.channels.SocketChannel A selectable channel for stream-oriented connecting sockets.
 

Exception Summary
AlreadyConnectedException sample code for java.nio.channels.AlreadyConnectedException definition code for java.nio.channels.AlreadyConnectedException Unchecked exception thrown when an attempt is made to connect a SocketChannel sample code for java.nio.channels.SocketChannel definition code for java.nio.channels.SocketChannel that is already connected.
AsynchronousCloseException sample code for java.nio.channels.AsynchronousCloseException definition code for java.nio.channels.AsynchronousCloseException Checked exception received by a thread when another thread closes the channel or the part of the channel upon which it is blocked in an I/O operation.
CancelledKeyException sample code for java.nio.channels.CancelledKeyException definition code for java.nio.channels.CancelledKeyException Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid.
ClosedByInterruptException sample code for java.nio.channels.ClosedByInterruptException definition code for java.nio.channels.ClosedByInterruptException Checked exception received by a thread when another thread interrupts it while it is blocked in an I/O operation upon a channel.
ClosedChannelException sample code for java.nio.channels.ClosedChannelException definition code for java.nio.channels.ClosedChannelException Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon channel that is closed, or at least closed to that operation.
ClosedSelectorException sample code for java.nio.channels.ClosedSelectorException definition code for java.nio.channels.ClosedSelectorException Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector.
ConnectionPendingException sample code for java.nio.channels.ConnectionPendingException definition code for java.nio.channels.ConnectionPendingException Unchecked exception thrown when an attempt is made to connect a SocketChannel sample code for java.nio.channels.SocketChannel definition code for java.nio.channels.SocketChannel for which a non-blocking connection operation is already in progress.
FileLockInterruptionException sample code for java.nio.channels.FileLockInterruptionException definition code for java.nio.channels.FileLockInterruptionException Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock.
IllegalBlockingModeException sample code for java.nio.channels.IllegalBlockingModeException definition code for java.nio.channels.IllegalBlockingModeException Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode.
IllegalSelectorException sample code for java.nio.channels.IllegalSelectorException definition code for java.nio.channels.IllegalSelectorException Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel.
NoConnectionPendingException sample code for java.nio.channels.NoConnectionPendingException definition code for java.nio.channels.NoConnectionPendingException Unchecked exception thrown when the finishConnect sample code for java.nio.channels.SocketChannel.finishConnect() definition code for java.nio.channels.SocketChannel.finishConnect() method of a SocketChannel sample code for java.nio.channels.SocketChannel definition code for java.nio.channels.SocketChannel is invoked without first successfully invoking its connect sample code for java.nio.channels.SocketChannel.connect(java.net.SocketAddress) definition code for java.nio.channels.SocketChannel.connect(java.net.SocketAddress) method.
NonReadableChannelException sample code for java.nio.channels.NonReadableChannelException definition code for java.nio.channels.NonReadableChannelException Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading.
NonWritableChannelException sample code for java.nio.channels.NonWritableChannelException definition code for java.nio.channels.NonWritableChannelException Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing.
NotYetBoundException sample code for java.nio.channels.NotYetBoundException definition code for java.nio.channels.NotYetBoundException Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound.
NotYetConnectedException sample code for java.nio.channels.NotYetConnectedException definition code for java.nio.channels.NotYetConnectedException Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected.
OverlappingFileLockException sample code for java.nio.channels.OverlappingFileLockException definition code for java.nio.channels.OverlappingFileLockException Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file.
UnresolvedAddressException sample code for java.nio.channels.UnresolvedAddressException definition code for java.nio.channels.UnresolvedAddressException Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address.
UnsupportedAddressTypeException sample code for java.nio.channels.UnsupportedAddressTypeException definition code for java.nio.channels.UnsupportedAddressTypeException Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported.