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

Vous voulez voir cette page en français ? Cliquez ici.

Sign in to turn on 1-Click ordering.
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.

Java I/O [Paperback]

Elliotte Rusty Harold
3.7 out of 5 stars  See all reviews (23 customer reviews)
List Price: CDN$ 74.99
Price: CDN$ 59.80 & FREE Shipping. Details
You Save: CDN$ 15.19 (20%)
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
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
Ships from and sold by Gift-wrap available.


Amazon Price New from Used from
Kindle Edition CDN $29.51  
Paperback CDN $59.80  
Join Amazon Student in Canada

Book Description

May 26 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 largecategories: 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 automaticallycompressing 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

Customers Who Bought This Item Also Bought

Product Details

Product Description

From Amazon

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 alternate Paperback edition.


'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 alternate Paperback edition.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Customer Reviews

Most helpful customer reviews
1.0 out of 5 stars one of the worst offerings from O'Reilly Jan. 26 2007
1. Style does not engage the reader

2. I was falling asleep after reading 2 pages

3. paper quality is really bad, same is true for binding

4. examples are way too simple
Was this review helpful to you?
5.0 out of 5 stars Gentle, but, Comprehensive March 24 2004
Gentle, Clear Explanations, Easy to Follow. Covers Internationalization and Unicode. Basic Network Porgramming and Cryptography. Serialization.
Was this review helpful to you?
1.0 out of 5 stars Shame O'Reilly, shame! Oct. 1 2002
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. Great, I thought, something for those of us who speak English but sell software to the other 93% of the world.
After I had laid my [money] down at the bookstore, I found out the sordid truth- the author is a newbie in regards to the multilingual issues but didn't let it stop him from writing down some shockers. To be nice, he probably got a little enthusiastic about Java's genuinely wide multilingual capabilities and tried to promote it, but some parts of this book are anti-education, end of story...
Was this review helpful to you?
1.0 out of 5 stars I'd pass on this one. Nov. 24 2001
By A Customer
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. I would recommend the Java Tutorial series or; Just Java 2 by Peter Van der Linden, those are great learning books. They give you real value for your money. They do a great job of helping you learn what you need to, to get your programming assignments done at work. The Sun Java website has also been very helpful to me. There, you can find anything you need to without wasting 50 bucks for a book that does not help you that much.
Was this review helpful to you?
By A Customer
This book covers Java I/O in a relatively competent fashion.
However, the author, Mr. Harold, chose to use his very popular website on the day of terror--September 11, 2001--to condemn America for her foreign policy and to label the many analysts calling for reprisals "white war mongers". The implication--inescapable to me--was that we had it coming. In the several days following, he continued in the vein, never even bothering with a single sentence condemning the terrorists.
This bothered me a great deal. If it bothers you, I suggest you look at other books covering Java IO (Core Java 2 or Sun's Java Library books that cover IO come to mind).
Was this review helpful to you?
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. Plus it has the only discussion of Java-based serial and parallel port I/O that I've seen. One or two small rough spots but well worth the $'s.
Was this review helpful to you?
The book is good, complete and shows you the details of I/O for Java (you should be at least an intermediate programmer); however, there are some errata that you must check in the web page of O'Reilly.
You can download the code of examples from the web page, and this code is corrected (it compiles and run), but some examples in the book are not: If you write down the code directly from the book you'll realize the problems.
I bought it in in mid 2001, but the corrections were not yet included in the edition I got, so supose you'll have to include them. Nevertheless, after doing it, you'll have a good book to study and use the I/O capabilities of Java.
Was this review helpful to you?
5.0 out of 5 stars Excellent choice....... March 22 2001
By CG9685
First of all, this is not a reference, it explains the organization behind the I/O Library. If you are looking for a reference book to locate answers in under a minute this ISN'T the book for you, instead get 'Java in a Nutshell'. Second of all, this book helps you to learn the I/O classes by constructing a program that you modify throughout the book. If that will annoy you, don't get this book. Overall, I think this is a great book! It was well worth the investment. I had previously encountered I/O documentation in more broadly scoped Java books such as, Beginning Java, in other words not much detail. This book, however, blew me away with its detail, but it is presented in a very down to earth manner. In other words, you don't have to be a rocket scientist to understand what's going on. This book will take you from the top of the I/O class hierarchy and move you down into the specialized sub-classes. All the while explaining to you what each of the classes does and like I said before, a lot of supporting details. Best of all, this book helps you understand I/O by showing you how Sun logically organized the I/O Library. By the time you've finished the book it's much easier to understand how all of the classes come together to offer powerful I/O support. Before I read this book when I looked at the inheritance tree for the I/O Library my reponse was like "you've got to be kidding me! I'll never be able to get all of this down!". But after finishing this book I am in no way intimidated or confused by the I/O classes. Good luck!
Was this review helpful to you?
Want to see more reviews on this item?

Look for similar items by category