cajo cloned from java.net