O'Reilly logo

Java I/O by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Versions

In many ways, this book was inspired by the wealth of new I/O functionality included in Java 1.1. I/O in Java 1.0 is overall much simpler, though also much less powerful. For instance, there are no Reader and Writer classes in Java 1.0. However, there’s also no reliable way to read pure Unicode text. Furthermore, Java 1.1 added many new classes to the library for performing a variety of I/O-related tasks like compression, encryption, digital signatures, object serialization, encoding conversion, and much more.

Therefore, this book assumes at least Java 1.1. For the most part, Java 1.0 has been relegated to developing applets that run inside web browsers. Because the applet security manager severely restricts the I/O an untrusted applet can undertake, most applets do not make heavy use of I/O, and thus it should not be a major concern.

Java 2’s I/O classes are mostly identical to those in Java 1.1, with one noticeable exception. Java 2 does a much better (though still imperfect) job of abstracting out platform-dependent filesystem idiosyncrasies than does Java 1.1. Some (though not all) of these improvements are also available to Java 1.1 programmers working with Swing. I’ll discuss both the Java 1.1 and Java 2 approaches to the filesystem in Chapter 12.

In any case, when I discuss a method, class or interface that’s only available in Java 2, its signature will be suffixed with a comment indicating that. For example:

public interface Replaceable extends Serializable // Java 2

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required