Jersey 2 CRUD example

Posted on

Jersey is very popular framework to build restful services. In our previous blog Jersey 2 Hello World Example, we came up with basic example to get start with jersey framework. In this blog we will be discussing CRUD operation with jersey which will help you to create restful services with back end data. Technologies used in this examples are : Read the rest of this entry »

Secure Jersey 2 Hello World Example

Posted on Updated on

Jersey is very popular framework to build restful services. In this tutorial, we will learn how to do HTTP basic authentication, so that user won’t be able to access any resource untill they provided the correct username and passowrd. This example has been extended from our previous simple Jersy 2 Hello World tutorial. Please refer the previous tutorial for technology used and basic configurations.

Read the rest of this entry »

Read a file in java

Posted on Updated on

Java IO package contains classes which programmers are used to read content of a file . However, there are different ways to read content of a file and thus create dilemma to select one method over other. To select a efficient way, one should first consider nature of input file, content whether small or large and so on. In this blog, we have come up with different ways to read a file in Java with example. Read the rest of this entry »

BufferedReader vs Scanner

Posted on

There are different classes available in java to read content of a file. Most commonly and easiest way to read a file is using BufferedReader however in certain situation it is good to use Scanner class. You can find different ways to read content of a file in our blog read a file in java. Here, we are discussing the difference between BufferedReader and Scanner classes which are listed below, helps programmers to decide between BufferedReader and Scanner class. Read the rest of this entry »