public abstract class URL.URLConnection
- Object
- URL.URLConnection
Known subtypesURL.HttpURLConnection
Constructors
public URLConnection() |
Methods
Inherited methods
Constructor details
URLConnection
public URLConnection()Method details
connect
public abstract void connect()
throws IOExceptionThrows
getConnectTimeout
public int getConnectTimeout()setConnectTimeout
public void setConnectTimeout(int connectTimeout)getReadTimeout
public int getReadTimeout()setReadTimeout
public void setReadTimeout(int readTimeout)getURL
public URL getURL()getContentLength
public abstract int getContentLength()getContentLengthLong
public long getContentLengthLong()getContentType
public abstract String getContentType()getHeaderField
public abstract String getHeaderField(String s)getHeaderFields
public abstract Map<String, List<String>> getHeaderFields()getInputStream
public abstract InputStream getInputStream()
throws IOExceptionThrows
getOutputStream
public abstract OutputStream getOutputStream()
throws IOExceptionThrows
setRequestProperty
public void setRequestProperty(String key, String value)Sets the request property, replacing existing property with same key, if it already exists.
Parameters
keyString- The key of the request property.
valueString- The value of the request property.
getDoInput
public boolean getDoInput()setDoInput
public void setDoInput(boolean i)getDoOutput
public boolean getDoOutput()setDoOutput
public void setDoOutput(boolean i)