public abstract class URL.URLConnection

  1. Object
  2. URL.URLConnection

Known subtypesURL.HttpURLConnection

Constructors

public URLConnection()

Methods

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

Inherited methods

Constructor details

URLConnection

public URLConnection()

Method details

connect

public abstract void connect() throws IOException

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 IOException

getOutputStream

public abstract OutputStream getOutputStream() throws IOException

setRequestProperty

public void setRequestProperty(String key, String value)
Sets the request property, replacing existing property with same key, if it already exists.

Parameters

key String
The key of the request property.
value String
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)