Category Archives: Java

Gradle Primer

Gradle is one of the most versatile build tools, based on Groovy. It is extremely complex, and most of the programmers only require very little for their day to day activity. This article tries to provide a boost for whoever is currently using Ant or Maven and want or has to switch to Gradle.
Continue reading

OAuth Step By Step With Implementation

This is a step by step presentation of how to use the google OAuth to secure your application. The source code is included, you can download it and customize it for your needs.

There are a lot of libraries available for OAuth implementation. This is an implementation from scratch grouped inside a servlet filter, the only library used is GSON. I wanted to use the Google libraries but wanted to do something useful for other identity providers as well.

Continue reading

REST Web Services with Jersey

This is a "first steps" presentation of Jersey REST web services.

It is assumed you want to deploy on a regular Java application server. Client sample is provided as well, however it is well known the REST services are easy to consume without any convoluted technology.
Continue reading

How to use Java ObjectOutputStream

Java has a very sophisticated yet simple to use serialization mechanism. It allows a program to transform an object to an array of bytes. In that form, the object can be persisted on the disk or transferred via a socket, or kept in memory for future use.

Later the object can be recreated from this array of bytes for further use.
Continue reading