java utilities for common usage