I looked at the description on Amazon and it sounds good. Does it have lots of code examples too? Most O'Reilly books are really great with that (with a few exceptions) and it's always very helpful for me. Is there a way to use regular expressions to create a filter (wrapper) for the stream in 1.4? Or do you have to create regular expressions and parse each line of data explicitly using the expression?
Regular expressions don't really work directly on streams - you read from the stream to make a String (or other CharSequence object like CharBuffer). Reading line by line is probably the simplest way to do this - or read the entire stream contents into memory before applying a regex. If you try to apply a regex to a partially-read line, you have to worry about what to do if the pattern you're looking for is split between one read and another - and this is probably more trouble than you want to deal with, unless you have specific needs which require it.
Code Examples: All the code examples from my book, plus some others, are online at my Java NIO book site. Of course, you should still buy the book (assuming you don't win a free copy here) The regular expressions which are part of NIO operate on a new interface in JDK 1.4 named CharSequence. CharSequence is implemented by String, StringBuffer and CharBuffer (a new NIO class). Unless you make a special implementation of CharSequence which does something fancy, this means all the chars you want to apply the regex to must be in memory at once. There are several regex examples on my site, one of which is a fairly sophisticated .