 |
Java NIO View Larger Image | Ron Hitchens O'Reilly Media, Paperback, Published August 2002, 282 pages, ISBN 0596002882 | List Price: $34.95 Our Price: $21.95 You Save: $13.00 (37% Off)
| | | Availability: Out-Of-Stock |
Customer Reviews: 2 Average Customer Rating:      Write a Review and tell the world about this title! People who purchase this book frequently purchase: - Java Network Programming, 3rd Edition; Elliotte Rusty Harold, $25.50, 36% Off!
- Java Threads, 3rd Edition; Scott Oaks, et al, $24.95, 38% Off!
- Java Concurrency in Practice; Brian Goetz, et al, $29.95, 46% Off!
- Java Generics and Collections; Maurice Naftalin, et al, $21.95, 37% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
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.
Customer Reviews
Customer Reviews: 2 Average Customer Rating:      Apr 3, 2003     David Young from Sandy, UT Great overall review and explanation At only six chapters and 282 pages (including the index) O'Reilly's book, "Java NIO" (short for "New I/O") published in August 2002 by Ron Hichens, might lead one to think "Java NIO" was little more than a cursory examination of the NIO packages introduced in J2SE 1.4 as a response to the Java Specification Request (JSR) #51.
Yet, despite its relatively compact size, Mr. Hichens has done a very good job of introducing and explaining the many aspects of this New I/O. The book even includes the parts of JSR 51 that are only tangentially related to I/O, such as the new regular expression processing found in java.util.regex and new pluggable character set mappings.
Chapter 1 is a primer on general I/O concepts and mechanisms that provides a useful foundation for the following information. Beginning with a primer of the basics is a strategy that Mr. Hichens uses in each of the subjects in the following chapters. Its an important first step that is often omitted in books that are more interested in prose than instruction.
Chapter 2 offers a thorough explanation of the various Buffer classes. As the means for data accumulation and manipulation, Buffers are a natural first step in explaining the NIO package. It starts with a fairly detailed basic description followed with sections labeled Creating, Accessing, Filling, Flipping, Draining, Compacting, Marking, Comparing, Bulk Moves, Duplicating, etc. Each section provides simple yet useful examples of the various operations along with some helpful hints on potential pitfalls.
Chapter 3 adds about all youd want to know about the data channels that are used to convey the data into and out of buffer. As the book explains, Channels are not an extension or enhancement, but a new, first-class Java I/O paradigm. A Channel is a conduit that transports data efficiently between byte buffers and the entity on the other end of the channel (usually a file or socket). In the ensuing sections: Scatter/Gather, File Channels, Memory-Mapped Files, Socket Channels, Pipes and The Channel Utility Classes, he explains the use of channels within the NIO paradigm.
Chapter 4 covers Selectors. Selectors add another completely new ability to Java 1.4. With selectors Java now has a much more sophisticated ability to do asynchronous and multiplexed I/O. This is obviously very important to anyone dealing with real-time and/or high-demand I/O and it is one of the main reasons for JSR 51.
Again, the book does a very good job of explaining the concept and use of Selectors in chapter sections entitled: The Selection Process, Stopping the Selection Process, Managing Selection Keys, Concurrency, Asynchronous Closability and Selection Scaling.
Chapter 5 introduces and explains the use of the new java.util.regex package. Regular expression processing was part of the JSR 51 and thus part of this book because, while not strictly I/O related, it is obviously important when it comes to massaging data that one uses in I/O. It should be noted that the book covers the Java Regular Expression API quite well its not sufficient to acquaint a novice to the many intricacies of regular expressions. Of course OReilly has that covered in Jeffrey Friedls book, Mastering Regular Expressions.
In the last chapter, Chapter 6, Character Sets, the book presents a pretty close examination of the actual data that is moved in I/O and how it is abstracted in Java 1.4. If youve ever wondered about terms like character sets versus character encoding or how one character set might be compared with another or encoded into something else, this chapter will go a long way toward filling you in.
The book concludes with three appendices: NIO and the JNI, Selectable Channels Service Provider Interface (SPI) and NIO Quick Reference.
In summation, the concepts range from basic to quite advanced yet are presented in such a way that, even while being explained, the information is understandable and can be accessed for reference purposes. The examples are simple yet useful in demonstrating the concepts and implementation of them. The style is informative and complete yet very accessible and informal. Overall, a well written and useful book to anyone needing to know the usefulness and basic workings of the NIO packages.
Sep 16, 2002     Phil from New Jersey Good summary and explanation of NIO Most of the information in this book can be found by scouring the web, but having it all in one volume with the additional explanation makes this book valuable. It provides in-depth explanations of Buffers, Channels and Selectors, and even includes a section on the basics of regular expressions and how to use them with the java.util.regexp package. The example code is simple, which helps in understanding the basics; however, the examples are simple. This book is an excellent introduction and will even serve as a good reference, but anyone who has been using java nio for a little while should not expect any more advanced examples than those that are currently available on the web. Since I am most interested in non-blocking I/O, I found the description of the selection process, and how/when selection keys are processed to be the most useful. I recommend this book to anyone interested in using java nio.
|
 |