Nice tutorials
Jan. 24th, 2013 06:40 pmI learned Java when 1.2 was dangerously new, so I never learned NIO. I already knew how to use streams, and everything that I tried to read about NIO confused me, particularly the class docs.
But NIO has been around for 10 years now (even though the N stands for "new"), and when I was about to implement my own pipe with "old" IO, I thought it was time to try again. Congratulations to Jakob Jenkov for making it seem simple. He has an excellent NIO tutorial. My test app went from 12 minutes of single threaded number crunching to 23 seconds of Pipe goodness. I poked around his site and learned how to use ExecutorService to. Jolly good stuff, clearly expressed.
- "Channel: A nexus for I/O operations" Uh-huh...
- "Selector: A multiplexor of SelectableChannel objects" and "SelectableChannel: A channel that can be multiplexed via a Selector". I think that someone was thinking of a well-known joke.
But NIO has been around for 10 years now (even though the N stands for "new"), and when I was about to implement my own pipe with "old" IO, I thought it was time to try again. Congratulations to Jakob Jenkov for making it seem simple. He has an excellent NIO tutorial. My test app went from 12 minutes of single threaded number crunching to 23 seconds of Pipe goodness. I poked around his site and learned how to use ExecutorService to. Jolly good stuff, clearly expressed.