Class URL.URLConnection

java.lang.Object
com.codename1.io.URL.URLConnection
Direct Known Subclasses:
URL.HttpURLConnection
Enclosing class:
URL

public abstract class URL.URLConnection extends Object
  • Constructor Details

    • URLConnection

      public URLConnection()
  • Method Details

    • connect

      public abstract void connect() throws IOException
      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
      Throws:
      IOException
    • getOutputStream

      public abstract OutputStream getOutputStream() throws IOException
      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: The key of the request property.

      • value: The value of the request property.

      Since

      7.0

    • getDoInput

      public boolean getDoInput()
    • setDoInput

      public void setDoInput(boolean i)
    • getDoOutput

      public boolean getDoOutput()
    • setDoOutput

      public void setDoOutput(boolean i)