JSF 2 Tutorials and Examples


JavaServer Faces (JSF) which provides a Component-Based Architecture for developing reusable User Interface Components hides most of the complex stuffs that are happening in the View portion of the MVC-2 Architecture. The framework is not only limited to developing customized User Interface Components but also provides support for various Advanced Features like Event handling Mechanism, Validating User Inputs that are sent by the clients, Easy Page Navigation […]

How To List Contents Of Zip File using Java


This example shows how to list the files inside a zip file. Zip is the most widely used utility for compressing the files and it is the Windows platform standard. In cases where you would need to work on the Zip file in Java for reading and writing into zip file. Here I write a […]

How To Install MongoDB On Windows


MongoDB, is an open source document database and the leading NO SQL database written in C++. MongoDB is used as a persistence store and it get adapted by different latest libraries and implementations, so Eclipse JPA/NoSQL has provided a library for get your application integrated with MongoDB as Spring Data. In this tutorial, we are going […]



java.io.NotSerializableException is thrown when the object is not eligible for the serialization. You must implement the Serializable interface to make the class eligible for the serialization. This is a marker interface which tells the JVM that the class can be serialized. Look at the below example. Employee.java Employee class which not implementing the serializable interface. NotSerializableExceptionExample.java […]



In my previous example I have explained how to check if your JVM support the charset used by your application. Java IO package defines java.io.UnsupportedEncodingException as a checked exception for catching it if programmers want to use the charset operation. If the JVM not supports the charset, then you will get the java.io.UnsupportedEncodingException thrown from your application. […]

How To Get Supported CharSet From JVM


If you want to view the web page or anything in your system, there must be chartset to support the one used in the web page or files. Most of the web pages would work because the most common charset is English which is by default supported by all the platforms. If you are viewing […]

Append To File using FileOutputStream


In my previous example I have explained about how to write to a file using the FileOutputStream. This example demonstrates how to append to an existing file without creating the new file. By default, FileOutputStream creates new file or overwrite when we try to write into a file. If you want to append with the […]

Java PrintStream Example


In my previous example I have explained about the PrintWriter for printing the formatted output to the console and file. This example demonstrates how to use the PrintStream. Note that PrintWriter and PrintStream defines the similar methods and work very much similar, except that PrintWriter writes the sequence of characters and PrintStream writes the stream of […]

Java PrintWriter Example


Java provides PrintWriter for printing the well formatted output to the desired location.  This class takes the OutputStream or Writer as the input and prints the output with the human readable format. PrintWriter defines the following constructors: PrintWriter(File file) – Creates a new PrintWriter, without automatic line flushing, with the specified file. PrintWriter(File file, String […]

Java BufferedOutputStream Example


If you are writing the very much IO intensive application which needs to write huge amount of data to the files, then you have to do some kind of buffering to improve the performance. Here BufferedOutputStream will be helpful for writing the stream of characters into a file which internally manages a buffer for improving the […]

Java FileOutputStream Example


This example discuss about the FileOutputStream. This class extends from the OutputStream and used for writing the stream of bytes into a file. This class has the following constructors for creating the instance. FileOutputStream(File file) – Creates a file output stream to write to the file represented by the specified File object. FileOutputStream(File file, boolean […]

Please support the site
By clicking any of these buttons you help our site to get better