some helpful java utilities