Search 12512 Results
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 ab
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 storin
The StreamTokenizer is another very useful class that parses an input stream into tokens. This class is not derived from InputStream or OutputStream.
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 applicatio
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
If we are working with binary data such as images and sounds, we need to use binary mode files.
Similar to the InputStream class, the abstract OutputStream class is a superclass of all classes representing an output stream of bytes. A few example
The File Copy program accepts two command-line parameters and copies the contents of the file specified by the first parameter to the filename specifi
The read method we used in the previous post is in fact defined in the InputStream class. The FileInputStream class that extends from the InputStream
Java provides a rich set of classes for I/O. A high-level class diagram for the I/O class library is shown here:
One of the important set of classes comprised in Java API is the java.io package. This is one of the core packages of the Java language and was a part
As seen in the previous post, we need to construct an instance of a user-defined exception; the Java runtime cannot detect and create instances of use
You need to log in or register to vote on answers or questions.