Some simple java classes for common usages