Java Network Programming, 3rd Edition
by Elliotte Rusty Harold
Java Concurrency in Practice
by Brian Goetz; Tim Peierls; Joshua Bloch; Joseph Bowbeer; David Holmes; Doug Lea
Java™ I/O, 2nd Edition
by Elliotte Rusty Harold
Java Threads, 3rd Edition
by Scott Oaks; Henry Wong
Java Generics and Collections, 1st Edition
by Maurice Naftalin; Philip Wadler
Hadoop: The Definitive Guide, 1st Edition
by Tom White
Java Web Services: Up and Running, 1st Edition
by Martin Kalin
Java in a Nutshell, 5th Edition
by David Flanagan
Grails in Action
by Glen Smith; Peter Ledbrook
RESTful Java with JAX-RS, 1st Edition
by Bill Burke
Many serious Java programmers, especially enterprise Java programmers, consider the new I/O API--called NIO for New Input/Output--the most important feature in the 1.4 version of the Java 2 Standard Edition. The NIO package includes many things that have been missing from previous editions of Java that are critical to writing high-performance, large-scale applications: improvements in the areas of buffer management, scalable network and file I/O, character-set support, and regular expression matching. Most of all, it boosts performance and speed dramatically. Java NIO explores the new I/O capabilities of version 1.4 in detail and shows you how to put these features to work to greatly improve the efficiency of the Java code you write. This compact volume examines the typical challenges that Java programmers face with I/O and shows you how to take advantage of the capabilities of the new I/O features. You?ll learn how to put these tools to work using examples of common, real-world I/O problems and see how the new features have a direct impact on responsiveness, scalability, and reliability. The book includes:
A rundown of the new features in NIO
Basic and advanced I/O Concepts
Binary I/O and the new buffer classes
Memory mapped files and file locking
Character I/O: encoding, decoding and transforming character data
Regular Expressions and the new java.util.regex package
Muliplexing with java.nio
Because the NIO APIs supplement the I/O features of version 1.3, rather than replace them, you'll also learn when to use new APIs and when the older 1.3 I/O APIs are better suited to your particular application. Java NIO is for any Java programmer who is interested in learning how to boost I/O performance, but if you're developing applications where performance is critical, such as game computing or large-scale enterprise applications, you'll want to give this book a permanent spot on your bookshelf. With the NIO APIs, Java no longer takes a backseat to any language when it comes to performance. Java NIO will help you realize the benefits of these exciting new features.
Average Amazon.com® Rating: ![]()
![]()
![]()
![]()
Based on 17 Ratings
A book by RonF Hitchens - 2006-11-17
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
No, that's not a mistake the F in the RonF, I really meant it.. in italian "ronf ronf" stands for the sleeping snore, and that's what you will be doing if you try to read this book. I had to struggle with myself real hard to force my way through this book, and trust me, I am used to reading books that are not exactly pure entertainment. The material presented is actually quite accurate and useful, only the presentation style is abysmally boring, arid and schematic. Even the table of contents reflects that, it goes: Buffer - Channel - Selectors - Regexp - Charsets. Every subject is explained pretty much in isolation of each other. How can you possibly put together anything even remotely engaging and conving with a style like that? It's like trying to teach you the english language using a dictionary, first learn all the words that start with A, then let's go to the B...
The irony is that in the intro to chap 1, the author even makes jokes about IO not being so dull as usually believed. Well I agree with him , but he certainly managed to make an outstanding contribution to the dullness of IO. Should he be congratulated?
Book takes you halfway - 2009-11-30
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I had this book sitting on my shelf for awhile, but recently I started a side-project on some open source. I wanted to convert to asynchronous non-blocking IO. Without async non-blocking IO, I had to to either have a thread sitting on a blocking read, or would have to create a new socket for each call. Either choice was poor. I needed non-blocking IO.
Well, I don't know what quite to say.
Certainly I am left with the general impression that NIO is quite difficult to use. Certainly one can find 'demo' examples on the web, yet the ones I have found really don't work. I took a demo example on the web and spent several days trying to convert it to something that could actually handle a series of bi-directional messages on the same socketchannel.
Well, as a piece of demo code, it worked fine for a single message being sent and a response received. But try doing the same thing a hundred times in a loop and it fails quickly.
Still don't have this 'demo' working, as my smoke tests show occasional errors in a series of echo tests. That is, client loops 100 times sending a different message each time to the server, and then client confirms that it received the same message as its reply (or not). Well, somewhat random failures occurred running this code. And this is the state of the code today.
Now back to the book...
Looking at the Java NIO book was not helpful. I read the given sections of the book, and went back and forth between the book and the demo code. Nothing helpful in the book because the book's examples did not show how to produce a reliable conversation between client and server across a socketchannel.
What I really wanted was an example that would show a semi-productionable case of async non-blocking I/O between a client and a server, and that meant that it should have many clients repeatedly calling the same server, again and again and again. While that may be in the book somewhere, I didn't find it. Nothing showing scalability and longevity as far I could see. I would be glad to be corrected.
This brings me to the topic of NIO frameworks.
Looking at briefly at NIO frameworks, my impression is that they had to use state machines and other techniques to build on top of NIO. I believe at this point that there is a lot of "exercise for the reader" work when it comes to using NIO. A *lot*. So in the end, maybe I will need to use a framework to make up for the problems of NIO.
Still where are semi-real examples of NIO code on the web?
It is somewhat indicative that the web is not full of examples of folks who got robust async IO to work and want to share it. Instead, I read one post where a group of professional software engineers took 3 months to get their scalable use of NIO to work in a router application. In the end, it did, and they were very happy with the results. But their post seemed a somewhat cautionary tale.
But the point of a book like this, as I see it, is to save me some portion of that 3 months, hopefully
a large portion of it, and it has not at all. It provides some beginner code, but how to build a scalable server? No.
This review does sound dangerously close to a rant, but I really don't mean it that way.
Scalable async IO is the flagship feature of NIO for many folks, and this book provides only very partial help here. It is like a boat that goes halfway across the river and stops. Maybe just a quarter of the way... I want a boat that takes me across the river, or at least gets me closer to the other side. Or, if it cannot warn me about missing advanced material. It could at least suggest what I would still to learn outside of the book's scope.
The book doesn't do this at all.... For this reason, it would be great if someone wrote a book on async IO and nothing else using NIO. Now that would be helpful!
Now I have still given the book three stars because I think NIO is simply very difficult material. It would be unfair to the author to give him a harsh review given the difficulty of the material.
Mislabeled, superficial, terse... - 2010-02-03
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Actually the small subtitle on the top of the front page "Regular Expressions and High-Performance I/O" would be the better title. "Java NIO" is incorrect. That suggest already that the mere 282 pages are not completely devoted to explaining usage of NIO package. The obvious conclusion is that this book is to terse to grant it the status of the sole source of information on NIO. But wait, there is more: The author feels the necessity to quote the Java package specifications, which we all have anyways on the net. This nonsensical waste of paper starts on the page 238, preceded by several pages of a similarly useless appendix B which quotes java.nio.channels.spi specifications. Thus the book has de facto approx. 230 pages.
But wait, there is more! Already on the page 151 author abandons NIO and devotes himself to a talk about regular expression package, and... in his code examples uses boldly standard java.io. His examples are of a stunning banality and simplicity, to terse to be of any use beyond the regular Java instructional trail on the net.
Regarding NIO, the 150 pages remaining, reader should rather take a look at "The JDK 1.4 Tutorial", 408 pages:
The JDK 1.4 Tutorial. Travis'es chapter 1 and 2 clearly top this text in every aspect. Hitchens code examples seem very arbitrary, and often to verbose, dealing with, or constructing something not pertinent to IO itself. For example, pages 63/65, where author suggest to "wait" in a spinning while loop for write, without any sleep (hm..., is that really necessary?) and later on wastes an entire page on assembling some arbitrary text messages or sentences of a kind. Every reader will make many more such observations.
Not a good call on O'Reilly's part... NIO is very complex indeed, and every practitioner has his/her own set of papers and snippets collected over the time, still waiting for "the ultimate" summary by someone. Last but not least, what annoys me in this book are the nonsensical and banal quotes of someone or something in the beginning of the chapters. This is a very nasty habit, copied over and over again by many authors. Only a few writers have the knowledge and ability to make such quotes, see Donald Knuth to contrast what you will find in this book. For example, "here, put this fish in you ear" by Ford Prefect. I have no clue what that means, and who or what Ford Prefect was. The said appendix with cut-and-paste of Java package specifications starts with a sentence by "U2", what ever that means. The equally useless appendix B starts with "If you build it, he will come" by... "An Iowa cornfield"! I have really no words to comment on this nonsense.
Now let me pack the "NIO users manual" and ship it back to Amazon. Give me my money back!
Excellent book on Java NIO - 2009-09-14
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
I really enjoyed this book, and found it very helpful in learning about Java NIO. All of the code I tried worked, and I was able to improve my older Java IO-based code quickly as a result. Excellent book!
Great book for a very overlooked subject - 2009-04-13
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
This is a great book on a subject that seems to get swept under the covers alot. NIO is very powerful but very confusing and this book really helps. the examples are very good and actually useful.
Top Level Categories:
Internet/Online
Programming
Sub-Categories:
Internet/Online > Java
Programming > Java
Java > Input and Output Streams
Some information on this page was provided using data from Amazon.com®. View at Amazon >