Misc Java uility classes