Helpers for java - at the moment java 6 to be android compatible