NIO Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


=ByteBuffer=
=ByteBuffer=
=Channel=
A channel represents an open connection to an entity such as a hardware device, a file, a network socket or a program component that is capable of performing one or more distinct I/O operations - for example reading or writing.
A channel is either opened or closed. A channel is open upon creation and once closed it remains closed.
Chanel are in general intended to be safe for multithreaded access.

Revision as of 04:53, 19 January 2016

Internal

Buffer

java.nio.Buffer is a linear, finite sequence of elements of a specific primitive type. Networking software uses ByteBuffers.

ByteBuffer

Channel

A channel represents an open connection to an entity such as a hardware device, a file, a network socket or a program component that is capable of performing one or more distinct I/O operations - for example reading or writing.

A channel is either opened or closed. A channel is open upon creation and once closed it remains closed.

Chanel are in general intended to be safe for multithreaded access.