category

home / developersection / category

Java I/O: Live Data Application
java 25-May-2016
Java I/O: Live Data Application

We will now discuss the LiveData program mentioned earlier to illustrate the use of these classes. But before that lets see the case of NYSE and NASDAQ once again from previous post:

Java I/O: The Byte-Oriented Stream Classes
java 25-May-2016
Java I/O: The Byte-Oriented Stream Classes

In the previous posts, we got an introduction to byte-oriented stream classes, where we used the FileInputStream classFileOutputStream classAs we can

Java I/O: Reading/Writing Objects -Serialization
java 25-May-2016
Java I/O: Reading/Writing Objects -Serialization

The Java I/O library provides classes that allow us to read or write a user-defined object from or to a stream. The two classes: ObjectInputStream  O

Java I/O: Accessing the Host File System
java 25-May-2016
Java I/O: Accessing the Host File System

Here we discuss another important class in the I/O package. The java.io.File class provides an abstract representation of a file or directory on the host file system.

Java I/O: File Concatenation
java 25-May-2016
Java I/O: File Concatenation

The File Concatenation program, as the name suggests, concatenates the contents of a given number of files. We specify the files on the command line as a variable argument list.

Java I/O: The Line Count Program
java 25-May-2016
Java I/O: The Line Count Program

The Line Count program counts the number of lines in the specified text file. Java provides a class called LineNumberReader for this purpose. The LineNumberReader class wraps the BufferedReader class, which in turn wraps the Reader class.

Java I/O: File Viewer Utility
java 24-May-2016
Java I/O: File Viewer Utility

Let’s write a utility called File Viewerthat accepts the name of a character file on the command line and displays its contents to the user console.

Java I/O: Character Streams and Buffered Reader/Writers
java 24-May-2016
Java I/O: Character Streams and Buffered Reader/Writers

Just the way binary streams operate on binary files, the character streams operate on character files—that is, text files such as .txt, .odt, and .docx.

Java I/O: Determining File Length
java 24-May-2016
Java I/O: Determining File Length

The simplest way to determine the length of a physical file is to open it in binary mode When we use the byte-oriented classes based on InputStream a

Exception Handling in Java: Understanding throws with Example
java 23-May-2016
Exception Handling in Java: Understanding throws with Example

Exception Handling in Java: Understanding throws with ExampleLet’s look at the example shown here so we can better understand this feature. import

Exception Handling in Java: Checked/Unchecked Exceptions and throws keyword
java 23-May-2016
Exception Handling in Java: Checked/Unchecked Exceptions and throws keyword

In Java, exceptions are broadly classified as: Checked ExceptionsUnchecked Exceptions Sometimes, the checked exceptions are also called compile-tim

Exception Handling in Java: Printing a Stack Trace
java 21-May-2016
Exception Handling in Java: Printing a Stack Trace

In this post we are going to learn a very common practice developers usually follow when they are dealing with Exception handling. There is very handy