HttpEntity.
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final int | |
| private static final int | |
| private static final Charset | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static long | |
| public static void | consume(final HttpEntity
the entity to consume. entity)Ensures that the entity content is fully consumed and the content stream, if exists, is closed. |
| public static void | consumeQuietly(final HttpEntity
the entity to consume. entity)Ensures that the entity content is fully consumed and the content stream, if exists, is closed. |
| public static List | Returns: a list ofNameValuePair as built from the URI's query portion.The entity to parse entity)Returns a list of |
| public static List | Returns: a list ofNameValuePair as built from the URI's query portion.The entity to parse entity, final int The maximum size of the stream to read; use it to guard against unreasonable or malicious processing. maxStreamLength)Returns a list of |
| public static byte[] | Returns: byte array containing the entity content. May be null ifHttpEntity#getContent() is null.the entity to read from= entity)Reads the contents of an entity and return it as a byte array. |
| public static byte[] | Returns: byte array containing the entity content. May be null ifHttpEntity#getContent() is null.the entity to read from= entity, final int The maximum size of the String to return; use it to guard against unreasonable or malicious processing. maxResultLength)Reads the contents of an entity and return it as a byte array. |
| private static CharArrayBuffer | toCharArrayBuffer(final InputStream inStream, final int contentLength, final Charset charset, final int maxResultLength)
|
| private static int | Returns: The given content length or 4096 if it is < 0.an integer. contentLength)Gets a usable content length value for the given candidate. |
| private static String | |
| public static String | Returns: the entity content as a String. May be null ifHttpEntity#getContent() is null.must not be null entity, final Charset character set to be applied if none found in the entity,
or if the entity provided charset is invalid or not available. defaultCharset)Gets the entity content as a String, using the provided default character set if none is found in the entity. |
| public static String | Returns: the entity content as a String. May be null ifHttpEntity#getContent() is null.must not be null entity, final Charset character set to be applied if none found in the entity,
or if the entity provided charset is invalid or not available. defaultCharset, final int The maximum size of the String to return; use it to guard against unreasonable or malicious processing. maxResultLength)Gets the entity content as a String, using the provided default character set if none is found in the entity. |
| public static String | Returns: the entity content as a String. May be null ifHttpEntity#getContent() is null.must not be null entity, final String character set to be applied if none found in the entity defaultCharset)Gets the entity content as a String, using the provided default character set if none is found in the entity. |
| public static String | Returns: the entity content as a String. May be null ifHttpEntity#getContent() is null.must not be null entity, final String character set to be applied if none found in the entity defaultCharset, final int The maximum size of the String to return; use it to guard against unreasonable or malicious processing. maxResultLength)Gets the entity content as a String, using the provided default character set if none is found in the entity. |
| public static String | Returns: String containing the content.the entity to convert to a string; must not be null entity)Reads the contents of an entity and return it as a String. |
| public static String | Returns: String containing the content.the entity to convert to a string; must not be null entity, final int The maximum size of the String to return; use it to guard against unreasonable or malicious processing. maxResultLength)Reads the contents of an entity and return it as a String. |
| CONTENT_TYPE_MAP | back to summary |
|---|---|
| private static final Map<String, ContentType> CONTENT_TYPE_MAP | |
| DEFAULT_BYTE_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BYTE_BUFFER_SIZE | |
| DEFAULT_CHAR_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_CHAR_BUFFER_SIZE | |
| DEFAULT_CHARSET | back to summary |
|---|---|
| private static final Charset DEFAULT_CHARSET | |
| DEFAULT_ENTITY_RETURN_MAX_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_ENTITY_RETURN_MAX_LENGTH | |
| EntityUtils | back to summary |
|---|---|
| private EntityUtils() | |
| checkContentLength | back to summary |
|---|---|
| pack-priv static long checkContentLength(final EntityDetails entityDetails) | |
| consume | back to summary |
|---|---|
| public static void consume(final HttpEntity entity) throws IOException Ensures that the entity content is fully consumed and the content stream, if exists, is closed.
| |
| consumeQuietly | back to summary |
|---|---|
| public static void consumeQuietly(final HttpEntity entity) Ensures that the entity content is fully consumed and the content stream, if exists, is closed. The process is done, quietly , without throwing any IOException.
| |
| parse | back to summary |
|---|---|
| public static List Returns a list of This is typically used while parsing an HTTP POST.
| |
| parse | back to summary |
|---|---|
| public static List Returns a list of This is typically used while parsing an HTTP POST.
| |
| toByteArray | back to summary |
|---|---|
| public static byte[] toByteArray(final HttpEntity entity) throws IOException Reads the contents of an entity and return it as a byte array.
| |
| toByteArray | back to summary |
|---|---|
| public static byte[] toByteArray(final HttpEntity entity, final int maxResultLength) throws IOException Reads the contents of an entity and return it as a byte array.
| |
| toCharArrayBuffer | back to summary |
|---|---|
| private static CharArrayBuffer toCharArrayBuffer(final InputStream inStream, final int contentLength, final Charset charset, final int maxResultLength) throws IOException | |
| toContentLength | back to summary |
|---|---|
| private static int toContentLength(final int contentLength) Gets a usable content length value for the given candidate.
| |
| toString | back to summary |
|---|---|
| private static String toString(final HttpEntity entity, final ContentType contentType, final int maxResultLength) throws IOException | |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity, final Charset defaultCharset) throws IOException, ParseException Gets 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.
| |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity, final Charset defaultCharset, final int maxResultLength) throws IOException, ParseException Gets 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.
| |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity, final String defaultCharset) throws IOException, ParseException Gets 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.
| |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity, final String defaultCharset, final int maxResultLength) throws IOException, ParseException Gets 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.
| |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity) throws IOException, ParseException Reads 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.
| |
| toString | back to summary |
|---|---|
| public static String toString(final HttpEntity entity, final int maxResultLength) throws IOException, ParseException Reads 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.
| |