A useful utility routine that tries to guess the content-type of an object based upon its extension. This disgusting hack is used to check for files have some type that can be determined by inspection. Some URL connections occasionally need to to interactions with the user. Sets the ContentHandler factory. Some protocols support skipping fetching unless the object is newer than some time.
Some protocols do caching of documents.
After connecting, it is an Error to try to set them. Operations that depend on being connected, like getContentLength, will implicitly perform the connection if necessary. Connecting when already connected does nothing. Returns -1 if not known. Returns null if not known.