Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Very Good See details
$9.99 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Sell Back Your Copy
For a $0.58 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Java Nio
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Java Nio [Paperback]

Ron Hitchens (Author)
3.8 out of 5 stars  See all reviews (17 customer reviews)

List Price: $39.99
Price: $23.39 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $16.60 (42%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Book Description

0596002882 978-0596002886 August 15, 2002 1st

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.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Java Nio + Java I/O + Java Network Programming, Third Edition
Price For All Three: $92.74

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Java I/O $47.36

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Java Network Programming, Third Edition $21.99

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details


Customers Who Bought This Item Also Bought


Editorial Reviews

About the Author

Ron Hitchens is a California based computer consultant and educator whose career dates back to the disco era. His first exposure to computers was operating mainframes in the Air Force. His first programming language was COBOL, learned from a friend's borrowed textbook. Since that time Ron has used just about every computer system and programming language you can imagine: from 6502 assembler to XSLT. Ron spent much of the 1980s at the University of Texas at Austin, as student and staffer, where he burrowed deep into the Unix kernel and assisted with many interesting research projects. Ron spent the next several years doing kernel work for clients such as IBM and Unisys. Ron has also developed and taught professional development courses for the same clientele. Following a brief flirtation with C++, Ron fell in love with Java and has spent the last several years employing server-side Java technologies to build Web applications for clients ranging from start-ups to Fortune 500 companies. Ron is Founder and President of Ronsoft Technologies (www.ronsoft.com). Ron lives in California with his wife and co-pilot, Karen, and a dog named Boomer. When Ron isn't working (hah!) he and Karen enjoy snorkeling, bicycling and walking the dog.

Product Details

  • Paperback: 312 pages
  • Publisher: O'Reilly Media; 1st edition (August 15, 2002)
  • Language: English
  • ISBN-10: 0596002882
  • ISBN-13: 978-0596002886
  • Product Dimensions: 9.2 x 7 x 0.7 inches
  • Shipping Weight: 1.1 pounds (View shipping rates and policies)
  • Average Customer Review: 3.8 out of 5 stars  See all reviews (17 customer reviews)
  • Amazon Best Sellers Rank: #673,846 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

17 Reviews
5 star:
 (9)
4 star:
 (1)
3 star:
 (3)
2 star:
 (3)
1 star:
 (1)
 
 
 
 
 
Average Customer Review
3.8 out of 5 stars (17 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

29 of 33 people found the following review helpful:
2.0 out of 5 stars OK for beginners, January 18, 2003
Amazon Verified Purchase(What's this?)
This review is from: Java Nio (Paperback)
I bought this book because of the lack of material on java.nio.
The book is a good introduction to java.nio but that is the extent of it. Half the book is an api reference and regular expressions (why is this even covered in this book?).
The rest tells you a little bit about the API, but not how to use it. There are examples, but you have to download them from the internet (ie no CD with the book).

The best chapter you can download for free anyway, so don't bother buying the book. Just download the free chapter and the free examples. The material on the internet from this book covers 90% of what you need to know.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


21 of 23 people found the following review helpful:
5.0 out of 5 stars A very good summary and explanation of the New I/O in Java, April 3, 2003
This review is from: Java Nio (Paperback)
At only six chapters and 282 pages (including the index) one might think "Java NIO" (short for "New I/O") is 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 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 the new pluggable character set mappings.

Chapter 1 is a primer on general I/O concepts and mechanisms and provides a useful foundation for the following information. Beginning with the basics as a foundation is a strategy that Mr. Hichens uses in each of the subjects in the following chapters. It's an important first step, often omitted in books more interested in prose than instruction.

Chapter 2 is 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 begins 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 and warnings of potential pitfalls.

Chapter 3 adds about all you'd want to know about the channels 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, the use of channels within the NIO paradigm are extensively explained.

Chapter 4 covers Selectors. Selectors add another completely new ability to Java 1.4. With selectors Java now has a much more sophisticated and integrated 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.

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 Regular Expressions 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. While not strictly I/O related, as anyone familiar with Perl can attest, regular expression processing is very useful when it comes to manipulating any textual data used in I/O.

While it covers the Java Regular Expression API very well, it is not comprehensive enough to include the many intricacies of regular expressions. Of course O'Reilly has that covered in Jeffrey Friedl's book, "Mastering Regular Expressions."

The last chapter, Chapter 6, "Character Sets", is a pretty close examination of the actual data moved in I/O and demonstrates how Java 1.4 represents it in the class Charset.

If you've ever wondered about character sets and how they are involved in character encoding or how one character set might be compared with or encoded into another, this chapter will go a long way toward filling you in.

The book concludes with three appendices:

* NIO and the JNI - A more detailed explanation of a new Java ability to use system memory allocated with native (JNI) code. This is one way they managed to improve the performance of Java real-time 3D applications so dramatically.

* Selectable Channels Service Provider Interface (SPI) - Basically explains why this API is beyond the scope of the book and why it wouldn't be useful to anyone not programming a JVM or high-performance App server.

* NIO Quick Reference - Just as the name implies.

In summation, the concepts range from basic to advanced yet are presented in such a way that, even while being explained, the information is understandable and can be used for future reference purposes. The examples are simple yet useful in demonstrating the concepts and the implementation of them. The style is informative and complete yet very accessible and informal. Overall, a well written book useful to anyone needing to know the workings of the NIO packages of Java 1.4.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


13 of 13 people found the following review helpful:
3.0 out of 5 stars Good introduction to NIO (and regular exprs??), lacks depth, August 5, 2003
This review is from: Java Nio (Paperback)
The book is useful to get started on nio, but you may overgrow it after a week:
it does not delve deeply into the matter. Particularly missing are:
- Mapped byte buffer uses
- Interactions between java & else using mapped files
- OS/platform idiosyncrasies (limits etc)
- Performance analysis

Finally, be aware that half of the book is devoted to regular expressions. The conflagration of nio and regexps is rather strange. I would rather have a shorter book with just a little more depth.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
using selectors, transformation format, byte ordering, string buffer, more file content, registered key set, custom charset, selected key set, public int end, cancelled key set, new charsets, readiness selection, filesystem pages, public int start, charset class, int ops, socket channels, charset name, mapped buffers, selector object, object att, append position, direct buffers, nonblocking mode, selectable channels
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Ron Hitchens, Channels Example, The Java Regular Expression, The Charset Service Provider Interface, Regular Expressions Example, Memory-Mapped Files, Duplicating Buffers, Channel Basics, Buffer Basics, Selector Basics, Selectors Example, Using Selection Keys, Selection Scaling, Hello World, The Channels Utility Class, Accessing Files, Java Regular Expression Syntax, Charset Encoders, Created April, File Channels, Byte Order
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(5)
(5)
(1)
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject