some java utilities