public abstract class URL.URLConnection extends Object
Constructor and Description |
---|
URLConnection() |
Modifier and Type | Method and Description |
---|---|
abstract void |
connect() |
int |
getConnectTimeout() |
abstract int |
getContentLength() |
long |
getContentLengthLong() |
abstract String |
getContentType() |
boolean |
getDoInput() |
boolean |
getDoOutput() |
abstract String |
getHeaderField(String s) |
abstract Map<String,List<String>> |
getHeaderFields() |
abstract InputStream |
getInputStream() |
abstract OutputStream |
getOutputStream() |
int |
getReadTimeout() |
URL |
getURL() |
void |
setConnectTimeout(int connectTimeout) |
void |
setDoInput(boolean i) |
void |
setDoOutput(boolean i) |
void |
setReadTimeout(int readTimeout) |
void |
setRequestProperty(String key,
String value)
Sets the request property, replacing existing property with same key, if it already exists.
|
public abstract void connect() throws IOException
IOException
public void setConnectTimeout(int connectTimeout)
public int getConnectTimeout()
public void setReadTimeout(int readTimeout)
public int getReadTimeout()
public URL getURL()
public abstract int getContentLength()
public long getContentLengthLong()
public abstract String getContentType()
public abstract InputStream getInputStream() throws IOException
IOException
public abstract OutputStream getOutputStream() throws IOException
IOException
public void setRequestProperty(String key, String value)
key
- The key of the request property.value
- The value of the request property.public void setDoInput(boolean i)
public boolean getDoInput()
public void setDoOutput(boolean i)
public boolean getDoOutput()