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 String |
DEFAULT_CHARSET |
protected static ThreadLocal<SimpleDateFormat[]> |
simpleDateFormat |
Constructor and Description |
---|
AsyncHttpProviderUtils() |
public static final String DEFAULT_CHARSET
protected static final ThreadLocal<SimpleDateFormat[]> simpleDateFormat
public static final SimpleDateFormat[] get()
public static final void validateSupportedScheme(URI uri)
public static final String contentToString(List<HttpResponseBodyPart> bodyParts, String 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 getPort(URI uri)
public static final MultipartRequestEntity createMultipartRequestEntity(List<Part> params, FluentCaseInsensitiveStringsMap requestHeaders) throws FileNotFoundException
params
- requestHeaders
- FileNotFoundException
public static final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException
IOException
public static String encodeCookies(Collection<Cookie> cookies)
public static String constructUserAgent(Class<? extends AsyncHttpProvider> httpProvider)
@Deprecated public static Cookie parseCookie(String value)
public static int convertExpireField(String timestring)
public static void checkBodyParts(int statusCode, Collection<HttpResponseBodyPart> bodyParts)
public static String keepAliveHeaderValue(AsyncHttpClientConfig config)
Copyright © 2013. All Rights Reserved.