Quick Guide to the Java StringTokenizer 1. Overview In this quick article, we’ll explore a fundamental class in Java – the StringTokenizer. 2. StringTokenizer The StringTokenizer class helps us split Strings into multiple tokens. StreamTokenizer provides similar functionality but the tokenization method is much simpler than the one used by… Continue Reading java-stringtokenizer

Spring Security OAuth2 – Simple Token Revocation 1. Overview In this quick tutorial, we’ll illustrate how we can revoke tokens granted by an OAuth Authorization Server implemented with Spring Security. When a user logs out, their token is not immediately removed from the token store, instead it remains valid until… Continue Reading spring-security-oauth-revoke-tokens

Apache Commons BeanUtils 1. Overview Apache Commons BeansUtils contains all tools necessary for working with Java beans. Simply put, a bean is a simple Java classes containing fields, getters/setters, and a no-argument constructor. Java provides reflection and introspection capabilities to identify getter-setter methods and call them dynamically. However, these APIs… Continue Reading apache-commons-beanutils

Zipping Collections in Java 1. Introduction In this tutorial, we’ll illustrate how to zip two collections into one logical collection. The “zip” operation is slightly different from the standard “concat” or “merge”. While the “concat” or “merge” operations will simply add the new collection at the end of the existing… Continue Reading java-collections-zip