Random java stuff I find useful but haven't found elsewhere