public class AsyncHttpProviderUtils extends Object
AsyncHttpProvider common utilities.
The cookies's handling code is from the Netty framework.| Modifier and Type | Field and Description |
|---|---|
static Charset |
DEFAULT_CHARSET |
static IOException |
REMOTELY_CLOSED_EXCEPTION |
| Constructor and Description |
|---|
AsyncHttpProviderUtils() |
public static final IOException REMOTELY_CLOSED_EXCEPTION
public static final Charset DEFAULT_CHARSET
public static final void validateSupportedScheme(Uri uri)
public static final String contentToString(List<HttpResponseBodyPart> bodyParts, Charset charset) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final byte[] contentToByte(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final InputStream contentToInputStream(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static final int getDefaultPort(Uri uri)
public static final String getNonEmptyPath(Uri uri)
public static final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException
IOExceptionpublic static String keepAliveHeaderValue(AsyncHttpClientConfig config)
public static int requestTimeout(AsyncHttpClientConfig config, Request request)
public static boolean followRedirect(AsyncHttpClientConfig config, Request request)
public static StringBuilder urlEncodeFormParams0(List<Param> params)
public static ByteBuffer urlEncodeFormParams(List<Param> params, Charset charset)
public static void encodeAndAppendQueryParam(StringBuilder sb, CharSequence name, CharSequence value)
Copyright © 2015. All Rights Reserved.