nio classes

R

Roedy Green

I would like to write an entry for the Java glossary on the nio
classes. I have no experience with them.

I'd like to give an overview of what they are for, when to use them,
when not, the major gotchas.

Any thoughts on what I should say?
 
T

Thomas G. Marshall

Roedy Green said:
I would like to write an entry for the Java glossary on the nio
classes. I have no experience with them.

I'd like to give an overview of what they are for, when to use them,
when not, the major gotchas.

Any thoughts on what I should say?


They can be used in place of anything else in java.io, and /should/ be for
that matter.

Most of the java.io classes were designed around the Decorator pattern.
Building a protocol stack of sorts: various layers adding to what you need
for io.

In addition to being very cumbersome to write, (java.io /was/ a little
fingertip unfriendly), this is a very inefficient mechanism for io. In
contrast, nio is an optimized non-decorator approach. You have buffers at
the bottom level. You hand buffers off to "channels" which represent the
i/o connections.

You'll find that nio has found itsway into other packages as well, so that
things such as socket i/o can be managed with channels.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

NIO not so hot 15
NIO multiplexing + thread pooling 16
JAVA NIO 4
NIO UDP and TCP 5
NIO writing to a channel 6
RandomAccessFile and java.nio.* 14
auto convert threaded to nio/event? 0
NIO enigma 4

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top