Java I/O and over one million other books are available for Amazon Kindle. Learn more



or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $1.00 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading Java I/O on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Java I/O [Paperback]

Elliotte Rusty Harold
3.9 out of 5 stars  See all reviews (28 customer reviews)

List Price: $59.99
Price: $47.36 & FREE Shipping. Details
You Save: $12.63 (21%)
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 Friday, June 21? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $27.35  
Paperback $47.36  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

May 23, 2006 0596527500 978-0596527501 Second Edition

All of Java's Input/Output (I/O) facilities are based on streams, which provide simple ways to read and write data of different types. Java provides many different kinds of streams, each with its own application. The universe of streams is divided into four large categories: input streams and output streams, for reading and writing binary data; and readers and writers, for reading and writing textual (character) data. You're almost certainly familiar with the basic kinds of streams--but did you know that there's a CipherInputStream for reading encrypted data? And a ZipOutputStream for automatically compressing data? Do you know how to use buffered streams effectively to make your I/O operations more efficient? Java I/O, 2nd Edition has been updated for Java 5.0 APIs and tells you all you ever need to know about streams--and probably more.

A discussion of I/O wouldn't be complete without treatment of character sets and formatting. Java supports the Unicode standard, which provides definitions for the character sets of most written languages. Consequently, Java is the first programming language that lets you do I/O in virtually any language. Java also provides a sophisticated model for formatting textual and numeric data. Java I/O, 2nd Edition shows you how to control number formatting, use characters aside from the standard (but outdated) ASCII character set, and get a head start on writing truly multilingual software.

Java I/O, 2nd Edition includes:

  • Coverage of all I/O classes and related classes
  • In-depth coverage of Java's number formatting facilities and its support for international character sets

Frequently Bought Together

Java I/O + Java Network Programming, Third Edition + Java Threads
Price for all three: $101.98

Buy the selected items together

Customers Who Bought This Item Also Bought


Editorial Reviews

Amazon.com Review

Because it doesn't provide a printf() function like C/C++, some developers think Java isn't up to snuff with files and streams. Author Rusty Harold Elliotte argues against this notion in Java I/O, a book that shows how Java's stream support can help simplify network programming, internationalization, and even compression and encryption.

The book opens with an overview of Java's stream capabilities. (The author defends Java's lack of support for console input/output (I/O) since today's applications use graphical user interfaces anyway.) He shows how to open, read, and write local files in Java applications. His file viewer example presents data in a variety of formats. (This example is improved several times until it winds up supporting different international character sets by the end of the book.)

Next the author covers network programming using URL and network streams, including sockets. Sections on filters show how classes can filter out characters within streams. The tour moves forward to cover data streams, which permit streaming of Java's primitive data types. Details on how to communicate within Java programs using pipes follow. In a notable chapter, the author thoroughly explicates Java's support for encryption, including hashing, the Data Encryption Standard (DES) algorithm, and ciphers.

The last portion of the book explains object serialization, which allows Java objects to save and restore their state, plus it includes sections on Java's support for data compression (and ZIP files) and multilingual Unicode character sets. (Java is prepared to handle virtually any of the world's languages with its reader and writer classes.) Finally, the author shows how you can format output in Java using its support for width and numeric precision APIs.

In all, Elliotte makes a good case that Java streams are a flexible and powerful part of the language, and certainly not a limitation. --Richard Dragan --This text refers to an out of print or unavailable edition of this title.

Review

'If I had to decide the best technical book ever read by me, this would be a real candidate. In my opinion a good programming book should limit itself to covering some well-defined part of its (usually) exhaustive topic. It should be easy to read with well-chose and short code-samples, especially for the critical parts and optionally, the code should grow throughout the chapters and evolve to full working programs at the end. This title fulfils it all... There aren't many illustrations throughout, but the reader will not miss them. The 'in-depth-notes' at strategic places are interesting and reveals a deep knowledge of the subject. So, if you want a fundamental understanding of streams, and data communication and /or a deep understanding of the Java I/O-model, buy it.' - Christer Loefving, Cvue, January 2000 --This text refers to an out of print or unavailable edition of this title.

Product Details

  • Paperback: 728 pages
  • Publisher: O'Reilly Media; Second Edition edition (May 23, 2006)
  • Language: English
  • ISBN-10: 0596527500
  • ISBN-13: 978-0596527501
  • Product Dimensions: 7 x 1.4 x 9.2 inches
  • Shipping Weight: 2.4 pounds (View shipping rates and policies)
  • Average Customer Review: 3.9 out of 5 stars  See all reviews (28 customer reviews)
  • Amazon Best Sellers Rank: #308,371 in Books (See Top 100 in Books)

More About the Author

Elliotte is originally from New Orleans to which he returns periodically in search of a decent bowl of gumbo. However, he currently resides in Brooklyn with his wife Beth and dog Thor. He's a frequent speaker at industry conferences including Software Development, Dr. Dobb's Architecture & Design World, SD Best Practices, Extreme Markup Languages, JavaWorld, and too many user groups to count.

Customer Reviews

3.9 out of 5 stars
(28)
3.9 out of 5 stars
Share your thoughts with other customers
Most Helpful Customer Reviews
25 of 25 people found the following review helpful
5.0 out of 5 stars Well-written, comprehensive treatment of the subject April 16, 1999
By A Customer
Format:Paperback
This is an excellent book.

After jumping around and reading about a third of it, I was already recommending to some of the newer Java programmers around me to pick it up and get a solid understanding of proper I/O use in Java. I very much recommend this as any Java programmer's second book. Right after learning the language itself, this book should be read followed closely by other O'Reilly titles such as Java Threads and Java Network Programming. Those three books will give an in-depth understanding of the core Java API's for any new Java programmer, and will be of use to you no matter how you are using Java.

Even after three years as a Java developer, I have learned from this book. The author often presents algorithms in clear steps and follows those clear steps with a correct implementation. Because of this clear presentation, the chapter on compression left me for the first time with an understanding of not only how to use the java.util.zip.* classes but how they work. What I learned there in one reading is immediately applicable to what I am working on now. The sections on Files is full of tips on how to use them in a cross platform fashion. Every new Java programmer needs to read that chapter before their applications actually get used.

I was also impressed that several I/O classes missing in the standard library which I have only recently developed myself were presented as well. The StreamCopier and the TeeOutputStream are extremely useful classes that should be incorporated in some fashion into the base API. I wish I had them a long time ago. (A hint: you can also use the TeeOutputStream as a 'Traitor' to peek at your I/O while your program is running and without affecting its execution.... Read more ›

Comment | 
Was this review helpful to you?
16 of 16 people found the following review helpful
Format:Paperback|Amazon Verified Purchase
The first edition of Java I/O is now seven years old, and it is definitely time for a second edition considering all that has transpired. Note that the second edition was released in May 2006, so all reviews older than that are referring to the first edition. In this second edition there are basically eight entirely new chapters added to the original seventeen. It is probably worth the price of an upgrade especially if you are interested in Java I/O as it pertains to devices. I review this second edition in the context of comparing it to the first edition.

Chapters 1 through 5 are virtually the same.
Chapter six, "Filter Streams", has had one section - Print Streams - removed and had another section on the ProgressMonitorInputStream class added. ProgressMonitorInputStream is a unique filter stream hiding in the javax.swing package that displays progress bars that indicate how much of a stream has been read and how much remains to be read, and this book shows how to use it when reading unusually large files. The section on Print Streams that was removed from chapter six now has an entire chapter dedicated to it. This is because, starting in Java 5, the familiar PrintStream class has become a lot more powerful and interesting. Besides basic console output, it now provides extensive capabilities for formatting numbers and dates in a straightforward and easy fashion.

The chapters on data streams, streams in memory, and compressing streams are virtually unchanged from the first edition. However, the "Jar Files" section from the "compressing streams" chapter has been removed and now has an entire chapter dedicated to it.
... Read more ›
Comment | 
Was this review helpful to you?
10 of 10 people found the following review helpful
5.0 out of 5 stars I finally understand Java I/O December 29, 1999
Format:Paperback
I had been using Java without really comprehending Java's approach to I/O. Other books never really explained what was going on to the extent that I could ever trust myself to write I/O code without having a book open.

This book clearly explains the theory and practice of Java I/O, and all the various features. It's the second most valuable Java book I own (Java in a Nutshell being the most frequently used). The book has led me to trying out facilities (such as compression and number formatting) that I otherwise shunned because of poor descriptions.

Comment | 
Was this review helpful to you?
13 of 14 people found the following review helpful
5.0 out of 5 stars Best programming book I've read April 24, 2000
Format:Paperback
The basis of Java is to make hard things easy and easy things impossible. And among one of these impossibilites is standard I/O.

After having tried almost every single I/O class in Java and having been only able to get FileReader and FileWriter to work successfully, I decided to buy this book. I was afraid that I would get it and it would be so technical that only people who wear pocket protectors as their standard gear would be able to read it, but this was not a problem. Mr. Harrold was perfectly willing to lay everything out just as clearly as was physically possible, while at the same time still giving an equal amount of importance to examples.

Other reviewers seem to have viewed this as a weakness in the book, but personally, I would say that having an extra 50% percent of stuff you will never need is better than only having half of what is necessary to accomplish anything.

Due to my having bought this book, in the last month I have gone from basic file reading and writing, building my own file reader with a readLine() method of my own make since Sun's is buggy, to internet connections to having most recently written a proxy that logs all events that go on in my internet browser by concurrently handling six I/O operations(an in from the internet to two outs to my browser and log file, and an in from my browser to the two outs of the internet and my log file.) And I say this not to boast my prowess, but to show you just how valuable this book is to anyone who will be doing any Java programming that involves I/O.

Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars simple as it can be
Just read few pages and you will realize this is a well written book. I enjoyed it and learned a lot. Java NIO is good book, but this is much better and simpler.
Published on March 12, 2010 by Vikram Prajapati
5.0 out of 5 stars Great book
This is a great book, honestly I have using a lot of its know-how on my job.
My advise is that all reader should know the decorator pattern to understand better the class... Read more
Published on January 23, 2009 by O. Salazar
4.0 out of 5 stars Java I/O
Thorough guide to the java.(n)io API. Less useful as a cookbook as the organization of the book follows the API rather than focusing on specific tasks (e.g. Read more
Published on March 23, 2008 by Eric Jain
2.0 out of 5 stars Far better resources available
It covers a lot of topics but I did find it particularly helpful in any way. The idea of gathering all the information about I/O into one book to use as a single resource is nice,... Read more
Published on June 17, 2007 by Rajiv Krishnaswamy
5.0 out of 5 stars Pretty good coverage of NIO and practical crypto
Not a fan of O'Reilly books, but this one stands out because of excellent NIO coverage and topical examples. It beats the the "Java NIO" book from O'Reilly hands down. Read more
Published on September 22, 2006 by Technical Reader
5.0 out of 5 stars Great reference for your file input/output logic...
[Review of 2nd edition]

Getting data into and out of files in your Java program can be painstaking when you consider all the variations... Read more
Published on September 10, 2006 by Thomas Duff
1.0 out of 5 stars Pass On This One
You'd probably do better following the tutorials on the Sun site.
Published on December 5, 2004 by KeepItSimple
1.0 out of 5 stars Shame O'Reilly, shame!
I picked up this book to cover multilingual charset issues, which are missing in all the standard Java resources but neatly listed in this title's contents/index. Read more
Published on October 1, 2002 by "akira238"
1.0 out of 5 stars I'd pass on this one.
This book does a fair job of covering the topic. I found it semi-useful. I would not recommend it however. Other books give you more value for the money. Read more
Published on November 24, 2001
4.0 out of 5 stars Excellent for the beginner to intermediate programmer
Great tutorial-like introduction to the Java I/O classes. Not a reference but very useful. A must buy if you want to boost your coding productivity. Read more
Published on August 24, 2001 by Dennis Lawler
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...


Create a guide


Look for Similar Items by Category