Some java utilities