Some utilities for java