Some java utilites