| Package | Description |
|---|---|
| org.apache.http.entity |
Core HTTP entity implementations.
|
| Modifier and Type | Method | Description |
|---|---|---|
static ContentType |
ContentType.create(java.lang.String mimeType) |
Creates a new instance of
ContentType without a charset. |
static ContentType |
ContentType.create(java.lang.String mimeType,
java.lang.String charset) |
Creates a new instance of
ContentType. |
static ContentType |
ContentType.create(java.lang.String mimeType,
java.nio.charset.Charset charset) |
Creates a new instance of
ContentType. |
static ContentType |
ContentType.create(java.lang.String mimeType,
NameValuePair... params) |
Creates a new instance of
ContentType with the given parameters. |
static ContentType |
ContentType.get(HttpEntity entity) |
Extracts
Content-Type value from HttpEntity exactly as
specified by the Content-Type header of the entity. |
static ContentType |
ContentType.getByMimeType(java.lang.String mimeType) |
Returns
Content-Type for the given MIME type. |
static ContentType |
ContentType.getLenient(HttpEntity entity) |
Extracts
Content-Type value from HttpEntity. |
static ContentType |
ContentType.getLenientOrDefault(HttpEntity entity) |
Extracts
Content-Type value from HttpEntity or returns the default value
DEFAULT_TEXT if not explicitly specified or incorrect (could not be parsed). |
static ContentType |
ContentType.getOrDefault(HttpEntity entity) |
Extracts
Content-Type value from HttpEntity or returns the default value
DEFAULT_TEXT if not explicitly specified. |
static ContentType |
ContentType.parse(java.lang.String s) |
Parses textual representation of
Content-Type value. |
ContentType |
ContentType.withCharset(java.lang.String charset) |
Creates a new instance with this MIME type and the given Charset name.
|
ContentType |
ContentType.withCharset(java.nio.charset.Charset charset) |
Creates a new instance with this MIME type and the given Charset.
|
ContentType |
ContentType.withParameters(NameValuePair... params) |
Creates a new instance with this MIME type and the given parameters.
|
| Constructor | Description |
|---|---|
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType) |
|
ByteArrayEntity(byte[] b,
ContentType contentType) |
|
FileEntity(java.io.File file,
ContentType contentType) |
|
InputStreamEntity(java.io.InputStream instream,
long length,
ContentType contentType) |
|
InputStreamEntity(java.io.InputStream instream,
ContentType contentType) |
Creates an entity with a content type and unknown length.
|
StringEntity(java.lang.String string,
ContentType contentType) |
Creates a StringEntity with the specified content and content type.
|