Question: Can you give me the URLConnection Class Methods?
Answer: Method: void addRequestProperty(String key, String value)
Description: It adds a general request property specified by a key-value pair

Method: void connect()
Description: It opens a communications link to the resource referenced by this URL, if such a connection has not already been established.

Method: boolean getAllowUserInteraction()
Description: It returns the value of the allowUserInteraction field for the object.

Method: int getConnectionTimeout()
Description:  It returns setting for connect timeout

Method: Object getContent()
Description:  It retrieves the contents of the URL connection.

Method: Object getContent(Class[] classes)
Description:  It retrieves the contents of the URL connection.

Method: String getContentEncoding()
Description:It returns the value of the content-encoding header field.

Method: int getContentLength()
Description: It returns the value of the content-length header field.

Method: long getContentLengthLong()
Description: It returns the value of the content-length header field as long.

Method: String getContentType()
Description: It returns the value of the date header field

Method: long getDate()
Description: It returns the value of the date header field.

Method: static boolean getDefaultAllowUserInteraction()
Description: It returns the default value of the allowUserInteraction field.

Method: boolean getDefaultUseCaches() 
Description: It returns the default value of an URLConnetion's useCaches flag.

Method: boolean getDoInput()
Description: It returns the value of the URLConnection's doInput flag.

Method: boolean getDoInput()
Description: It returns the value of the URLConnection's doOutput flag.

Method: long getExpiration()
Description:It returns the value of the expires header files.

Method: static FileNameMap getFilenameMap()
Description: It loads the filename map from a data file.

Method: String getHeaderField(int n)
Description:  It returns the value of nth header field

Method: String getHeaderField(String name)
Description: It returns the value of the named header field.

Method: long getHeaderFieldDate(String name, long Default)
Description: It returns the value of the named field parsed as a number.

Method: int getHeaderFieldInt(String name, int Default)
Description: It returns the value of the named field parsed as a number

Method: String getHeaderFieldKey(int n)
Description: It returns the key for the nth header field.

Method: long getHeaderFieldLong(String name, long Default)
Description:  It returns the value of the named field parsed as a number

Method: Map<String, List<String>> getHeaderFields()
Description: It returns the unmodifiable Map of the header field.

Method: long getIfModifiedSince()
Description:  It returns the value of the object's ifModifiedSince field.

Method: InputStream getInputStream()
Description:  It returns an input stream that reads from the open condition.

Method: long getLastModified()
Description: It returns the value of the last-modified header field.

Method: OutputStream getOutputStream()
Description:It returns an output stream that writes to the connection.
 
Method: Permission getPermission()
Description: It returns a permission object representing the permission necessary to make the connection represented by the object.

Method: int getReadTimeout()
Description: It returns setting for read timeout

Method: Map<String, List<String>> getRequestProperties()
Description: It returns the value of the named general request property for the connection.

Method: URL getURL()
Description: It returns the value of the URLConnection's URL field.

Method: boolean getUseCaches()
Description: It returns the value of the URLConnection's useCaches field.


Method:Static String guessContentTypeFromName(String fname)
Description:It tries to determine the content type of an object, based on the specified file component of a URL.

Method:static String guessContentTypeFromStream(InputStream is)
Description: It tries to determine the type of an input stream based on the characters at the beginning of the input stream.

Method: void setAllowUserInteraction(boolean allowuserinteraction)
Description: It sets the value of the allowUserInteraction field of this URLConnection.

Method: static void setContentHandlerFactory(ContentHandlerFactory fac)
Description: It sets the ContentHandlerFactory of an application.

Method: static void setDefaultAllowUserInteraction(boolean defaultallowuserinteraction)
Description: It sets the default value of the allowUserInteraction field for all future URLConnection objects to the specified value.

Method: void steDafaultUseCaches(boolean defaultusecaches)
Description: It sets the default value of the useCaches field to the specified value.

Method: void setDoInput(boolean doinput)
Description: It sets the value of the doInput field for this URLConnection to the specified value.

Method: void setDoOutput(boolean dooutput)
Description:It sets the value of the doOutput field for the URLConnection to the specified value.