Package org.teavm.classlib.java.net
Class THttpURLConnection
java.lang.Object
org.teavm.classlib.java.net.TURLConnection
org.teavm.classlib.java.net.THttpURLConnection
- Direct Known Subclasses:
TXHRURLConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
static int
Deprecated.static int
static int
static int
static int
static int
protected boolean
protected String
protected int
protected String
Fields inherited from class org.teavm.classlib.java.net.TURLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
static boolean
long
getHeaderFieldDate(String field, long defaultValue)
boolean
int
void
setChunkedStreamingMode(int chunklen)
void
setFixedLengthStreamingMode(int contentLength)
static void
setFollowRedirects(boolean auto)
void
setInstanceFollowRedirects(boolean followRedirects)
void
setRequestMethod(String method)
Methods inherited from class org.teavm.classlib.java.net.TURLConnection
addRequestProperty, connect, getAllowUserInteraction, getConnectTimeout, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getHeaderField, getHeaderField, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, setAllowUserInteraction, setConnectTimeout, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
Field Details
-
method
-
responseCode
protected int responseCode -
responseMessage
-
instanceFollowRedirects
protected boolean instanceFollowRedirects -
chunkLength
protected int chunkLength -
fixedContentLength
protected int fixedContentLength -
HTTP_ACCEPTED
public static final int HTTP_ACCEPTED- See Also:
- Constant Field Values
-
HTTP_BAD_GATEWAY
public static final int HTTP_BAD_GATEWAY- See Also:
- Constant Field Values
-
HTTP_BAD_METHOD
public static final int HTTP_BAD_METHOD- See Also:
- Constant Field Values
-
HTTP_BAD_REQUEST
public static final int HTTP_BAD_REQUEST- See Also:
- Constant Field Values
-
HTTP_CLIENT_TIMEOUT
public static final int HTTP_CLIENT_TIMEOUT- See Also:
- Constant Field Values
-
HTTP_CONFLICT
public static final int HTTP_CONFLICT- See Also:
- Constant Field Values
-
HTTP_CREATED
public static final int HTTP_CREATED- See Also:
- Constant Field Values
-
HTTP_ENTITY_TOO_LARGE
public static final int HTTP_ENTITY_TOO_LARGE- See Also:
- Constant Field Values
-
HTTP_FORBIDDEN
public static final int HTTP_FORBIDDEN- See Also:
- Constant Field Values
-
HTTP_GATEWAY_TIMEOUT
public static final int HTTP_GATEWAY_TIMEOUT- See Also:
- Constant Field Values
-
HTTP_GONE
public static final int HTTP_GONE- See Also:
- Constant Field Values
-
HTTP_INTERNAL_ERROR
public static final int HTTP_INTERNAL_ERROR- See Also:
- Constant Field Values
-
HTTP_LENGTH_REQUIRED
public static final int HTTP_LENGTH_REQUIRED- See Also:
- Constant Field Values
-
HTTP_MOVED_PERM
public static final int HTTP_MOVED_PERM- See Also:
- Constant Field Values
-
HTTP_MOVED_TEMP
public static final int HTTP_MOVED_TEMP- See Also:
- Constant Field Values
-
HTTP_MULT_CHOICE
public static final int HTTP_MULT_CHOICE- See Also:
- Constant Field Values
-
HTTP_NO_CONTENT
public static final int HTTP_NO_CONTENT- See Also:
- Constant Field Values
-
HTTP_NOT_ACCEPTABLE
public static final int HTTP_NOT_ACCEPTABLE- See Also:
- Constant Field Values
-
HTTP_NOT_AUTHORITATIVE
public static final int HTTP_NOT_AUTHORITATIVE- See Also:
- Constant Field Values
-
HTTP_NOT_FOUND
public static final int HTTP_NOT_FOUND- See Also:
- Constant Field Values
-
HTTP_NOT_IMPLEMENTED
public static final int HTTP_NOT_IMPLEMENTED- See Also:
- Constant Field Values
-
HTTP_NOT_MODIFIED
public static final int HTTP_NOT_MODIFIED- See Also:
- Constant Field Values
-
HTTP_OK
public static final int HTTP_OK- See Also:
- Constant Field Values
-
HTTP_PARTIAL
public static final int HTTP_PARTIAL- See Also:
- Constant Field Values
-
HTTP_PAYMENT_REQUIRED
public static final int HTTP_PAYMENT_REQUIRED- See Also:
- Constant Field Values
-
HTTP_PRECON_FAILED
public static final int HTTP_PRECON_FAILED- See Also:
- Constant Field Values
-
HTTP_PROXY_AUTH
public static final int HTTP_PROXY_AUTH- See Also:
- Constant Field Values
-
HTTP_REQ_TOO_LONG
public static final int HTTP_REQ_TOO_LONG- See Also:
- Constant Field Values
-
HTTP_RESET
public static final int HTTP_RESET- See Also:
- Constant Field Values
-
HTTP_SEE_OTHER
public static final int HTTP_SEE_OTHER- See Also:
- Constant Field Values
-
HTTP_SERVER_ERROR
Deprecated.- See Also:
- Constant Field Values
-
HTTP_USE_PROXY
public static final int HTTP_USE_PROXY- See Also:
- Constant Field Values
-
HTTP_UNAUTHORIZED
public static final int HTTP_UNAUTHORIZED- See Also:
- Constant Field Values
-
HTTP_UNSUPPORTED_TYPE
public static final int HTTP_UNSUPPORTED_TYPE- See Also:
- Constant Field Values
-
HTTP_UNAVAILABLE
public static final int HTTP_UNAVAILABLE- See Also:
- Constant Field Values
-
HTTP_VERSION
public static final int HTTP_VERSION- See Also:
- Constant Field Values
-
-
Constructor Details
-
THttpURLConnection
-
-
Method Details
-
disconnect
public abstract void disconnect() -
getErrorStream
-
getFollowRedirects
public static boolean getFollowRedirects() -
getRequestMethod
-
getResponseCode
- Throws:
IOException
-
getResponseMessage
- Throws:
IOException
-
setFollowRedirects
public static void setFollowRedirects(boolean auto) -
setRequestMethod
- Throws:
TProtocolException
-
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects() -
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean followRedirects) -
getHeaderFieldDate
- Overrides:
getHeaderFieldDate
in classTURLConnection
-
setFixedLengthStreamingMode
public void setFixedLengthStreamingMode(int contentLength) -
setChunkedStreamingMode
public void setChunkedStreamingMode(int chunklen)
-