Save This Page
Home » HttpComponents-Core-4.0.1 » org.apache.http.util » [javadoc | source]
org.apache.http.util
public final class: EntityUtils [javadoc | source]
java.lang.Object
   org.apache.http.util.EntityUtils
Static helpers for dealing with HttpEntity s.
Method from org.apache.http.util.EntityUtils Summary:
getContentCharSet,   toByteArray,   toString,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.http.util.EntityUtils Detail:
 public static String getContentCharSet(HttpEntity entity) throws ParseException 
    Obtains character set of the entity, if known.
 public static byte[] toByteArray(HttpEntity entity) throws IOException 
    Read the contents of an entity and return it as a byte array.
 public static String toString(HttpEntity entity) throws IOException, ParseException 
    Read the contents of an entity and return it as a String. The content is converted using the character set from the entity (if any), failing that, "ISO-8859-1" is used.
 public static String toString(HttpEntity entity,
    String defaultCharset) throws IOException, ParseException 
    Get the entity content as a String, using the provided default character set if none is found in the entity. If defaultCharset is null, the default "ISO-8859-1" is used.