Class TURLConnection

java.lang.Object
org.teavm.classlib.java.net.TURLConnection
Direct Known Subclasses:
THttpURLConnection

public abstract class TURLConnection extends Object
  • Field Details

    • url

      protected TURL url
    • ifModifiedSince

      protected long ifModifiedSince
    • useCaches

      protected boolean useCaches
    • connected

      protected boolean connected
    • doOutput

      protected boolean doOutput
    • doInput

      protected boolean doInput
    • allowUserInteraction

      protected boolean allowUserInteraction
  • Constructor Details

    • TURLConnection

      protected TURLConnection(TURL url)
  • Method Details

    • connect

      public abstract void connect() throws IOException
      Throws:
      IOException
    • getAllowUserInteraction

      public boolean getAllowUserInteraction()
    • getContentEncoding

      public String getContentEncoding()
    • getContentLength

      public int getContentLength()
    • getContentType

      public String getContentType()
    • getDate

      public long getDate()
    • getDefaultAllowUserInteraction

      public static boolean getDefaultAllowUserInteraction()
    • getDefaultRequestProperty

      @Deprecated public static String getDefaultRequestProperty(String field)
      Deprecated.
    • getDefaultUseCaches

      public boolean getDefaultUseCaches()
    • getDoInput

      public boolean getDoInput()
    • getDoOutput

      public boolean getDoOutput()
    • getExpiration

      public long getExpiration()
    • getHeaderField

      public String getHeaderField(int pos)
    • getHeaderFields

      public Map<String,​List<String>> getHeaderFields()
    • getRequestProperties

      public Map<String,​List<String>> getRequestProperties()
    • addRequestProperty

      public void addRequestProperty(String field, String newValue)
    • getHeaderField

      public String getHeaderField(String key)
    • getHeaderFieldDate

      public long getHeaderFieldDate(String field, long defaultValue)
    • getHeaderFieldInt

      public int getHeaderFieldInt(String field, int defaultValue)
    • getHeaderFieldKey

      public String getHeaderFieldKey(int posn)
    • getIfModifiedSince

      public long getIfModifiedSince()
    • getInputStream

      public InputStream getInputStream() throws IOException
      Throws:
      IOException
    • getLastModified

      public long getLastModified()
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Throws:
      IOException
    • getRequestProperty

      public String getRequestProperty(String field)
    • getURL

      public TURL getURL()
    • getUseCaches

      public boolean getUseCaches()
    • setAllowUserInteraction

      public void setAllowUserInteraction(boolean newValue)
    • setDefaultAllowUserInteraction

      public static void setDefaultAllowUserInteraction(boolean allows)
    • setDefaultRequestProperty

      @Deprecated public static void setDefaultRequestProperty(String field, String value)
      Deprecated.
    • setDefaultUseCaches

      public void setDefaultUseCaches(boolean newValue)
    • setDoInput

      public void setDoInput(boolean newValue)
    • setDoOutput

      public void setDoOutput(boolean newValue)
    • setIfModifiedSince

      public void setIfModifiedSince(long newValue)
    • setRequestProperty

      public void setRequestProperty(String field, String newValue)
    • setUseCaches

      public void setUseCaches(boolean newValue)
    • setConnectTimeout

      public void setConnectTimeout(int timeout)
    • getConnectTimeout

      public int getConnectTimeout()
    • setReadTimeout

      public void setReadTimeout(int timeout)
    • getReadTimeout

      public int getReadTimeout()
    • toString

      public String toString()
      Overrides:
      toString in class Object