com.duowan.mobile.netroid
Class HttpUtils

java.lang.Object
  extended by com.duowan.mobile.netroid.HttpUtils

public class HttpUtils
extends java.lang.Object


Constructor Summary
HttpUtils()
           
 
Method Summary
static byte[] entityToBytes(org.apache.http.HttpEntity entity)
          Reads the contents of HttpEntity into a byte[].
static java.lang.String getCharset(org.apache.http.HttpResponse response)
          Returns the charset specified in the Content-Type of this header.
static java.lang.String getHeader(org.apache.http.HttpResponse response, java.lang.String key)
           
static boolean isSupportRange(org.apache.http.HttpResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

entityToBytes

public static byte[] entityToBytes(org.apache.http.HttpEntity entity)
                            throws java.io.IOException,
                                   ServerError
Reads the contents of HttpEntity into a byte[].

Throws:
java.io.IOException
ServerError

getCharset

public static java.lang.String getCharset(org.apache.http.HttpResponse response)
Returns the charset specified in the Content-Type of this header.


getHeader

public static java.lang.String getHeader(org.apache.http.HttpResponse response,
                                         java.lang.String key)

isSupportRange

public static boolean isSupportRange(org.apache.http.HttpResponse response)