General java Utils for DR