Java I/O: Versioning Objects
Java I/O: Versioning Objects

We have covered how to persist the object state to a disk file. In many situations, the classes in a program evolve over time.

Java I/O: Understanding Externalizable Interface with Example
Java I/O: Understanding Externalizable Interface with Example

A program that illustrates the use of the Externalizable interface is given here. Note that the program uses Java’s security API. We need not worry about the security code while learning the importance of the Externalizable interface.

Java I/O: The Object-Oriented Streams- Externalizable Interface
Java I/O: The Object-Oriented Streams- Externalizable Interface

In the previous posts, we saw how to store and retrieve the objects using Serialization. We’ll now look at another very important technique for storing and retrieving objects.

Java I/O: The StreamTokenizer Class
Java I/O: The StreamTokenizer Class

The StreamTokenizer is another very useful class that parses an input stream into tokens. This class is not derived from InputStream or OutputStream. Yet, it is classified under the I/O library.

Java I/O: The Console Class
Java I/O: The Console Class

So far we have been using System.out to print messages to the console. Java SE 6 added a Console class to enhance and simplify command-line applications.

Java I/O: The PrintStream Class and Character-Oriented Stream Classes
Java I/O: The PrintStream Class and Character-Oriented Stream Classes

This is a very convenient class that has the ability to print representations of various data values, such as all primitive types. During printing it converts all characters into bytes using the platform’s default character encoding.