final class CloseableURLConnection extends URLConnection implements AutoCloseable
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
CloseableURLConnection(URLConnection urlConnection) |
CloseableURLConnection(URLConnection urlConnection)
public void addRequestProperty(String key, String value)
addRequestProperty in class URLConnectionpublic void close()
close in interface AutoCloseablepublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic boolean getAllowUserInteraction()
getAllowUserInteraction in class URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] classes) throws IOException
getContent in class URLConnectionIOExceptionpublic String getContentEncoding()
getContentEncoding in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic long getContentLengthLong()
getContentLengthLong in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionpublic long getDate()
getDate in class URLConnectionpublic boolean getDefaultUseCaches()
getDefaultUseCaches in class URLConnectionpublic boolean getDoInput()
getDoInput in class URLConnectionpublic boolean getDoOutput()
getDoOutput in class URLConnectionpublic long getExpiration()
getExpiration in class URLConnectionpublic String getHeaderField(int n)
getHeaderField in class URLConnectionpublic String getHeaderField(String name)
getHeaderField in class URLConnectionpublic long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate in class URLConnectionpublic int getHeaderFieldInt(String name, int Default)
getHeaderFieldInt in class URLConnectionpublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class URLConnectionpublic long getHeaderFieldLong(String name, long Default)
getHeaderFieldLong in class URLConnectionpublic Map<String,List<String>> getHeaderFields()
getHeaderFields in class URLConnectionpublic long getIfModifiedSince()
getIfModifiedSince in class URLConnectionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic long getLastModified()
getLastModified in class URLConnectionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic Permission getPermission() throws IOException
getPermission in class URLConnectionIOExceptionpublic int getReadTimeout()
getReadTimeout in class URLConnectionpublic Map<String,List<String>> getRequestProperties()
getRequestProperties in class URLConnectionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic URL getURL()
getURL in class URLConnectionpublic boolean getUseCaches()
getUseCaches in class URLConnectionstatic CloseableURLConnection open(URI uri) throws IOException
IOExceptionstatic CloseableURLConnection open(URL url) throws IOException
IOExceptionpublic void setAllowUserInteraction(boolean allowUserInteraction)
setAllowUserInteraction in class URLConnectionpublic void setConnectTimeout(int timeout)
setConnectTimeout in class URLConnectionpublic void setDefaultUseCaches(boolean defaultUseCaches)
setDefaultUseCaches in class URLConnectionpublic void setDoInput(boolean doInput)
setDoInput in class URLConnectionpublic void setDoOutput(boolean doOutput)
setDoOutput in class URLConnectionpublic void setIfModifiedSince(long ifModifiedSince)
setIfModifiedSince in class URLConnectionpublic void setReadTimeout(int timeout)
setReadTimeout in class URLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void setUseCaches(boolean useCaches)
setUseCaches in class URLConnectionpublic String toString()
toString in class URLConnection