com.ning.http.util
Class AsyncHttpProviderUtils
java.lang.Object
com.ning.http.util.AsyncHttpProviderUtils
public class AsyncHttpProviderUtils
- extends Object
AsyncHttpProvider
common utilities.
The cookies's handling code is from the Netty framework.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncHttpProviderUtils
public AsyncHttpProviderUtils()
createUri
public static final URI createUri(String u)
getBaseUrl
public static final String getBaseUrl(URI uri)
getPort
public static final int getPort(URI uri)
createMultipartRequestEntity
public static final MultipartRequestEntity createMultipartRequestEntity(List<Part> params,
FluentStringsMap methodParams)
throws FileNotFoundException
- This is quite ugly as our internal names are duplicated, but we build on top of HTTP Client implementation.
- Parameters:
params
- methodParams
-
- Returns:
- a MultipartRequestEntity.
- Throws:
FileNotFoundException
currentThread
public static final String currentThread()
readFully
public static final byte[] readFully(InputStream in,
int[] lengthWrapper)
throws IOException
- Throws:
IOException
encodeCookies
public static String encodeCookies(Collection<Cookie> cookies)
Copyright © 2010. All Rights Reserved.