Jan. 24th, 2013

jbanana: Badly drawn banana (Default)
I 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.
  • "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.

August 2025

M T W T F S S
    123
45678910
11121314151617
1819202122 2324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 1st, 2025 11:38 am
Powered by Dreamwidth Studios