Calls this routine to get an OutputStream that writes to the object. A useful utility routine that tries to guess the content-type of an object based upon its extension. This method is used to check for files that 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 amount of 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.