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
UnsupportedEncodingException
public static final byte[] contentToByte(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingException
public static final InputStream contentToInputStream(List<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException
UnsupportedEncodingException
public static final int getDefaultPort(Uri uri)
public static final String getNonEmptyPath(Uri uri)
public static final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException
IOException
public 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.