Package | Description |
---|---|
org.apache.http.entity |
Core HTTP entity implementations.
|
org.apache.http.nio.entity |
Core HTTP entity implementations with support for
asynchronous, event driven communication.
|
org.apache.http.nio.protocol |
Core HTTP protocol execution framework and HTTP protocol handlers
for asynchronous, event driven communication.
|
org.apache.http.util |
Core utility classes.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,ContentType> |
ContentType.CONTENT_TYPE_MAP |
Modifier and Type | Method and Description |
---|---|
private static ContentType |
ContentType.create(HeaderElement helem,
boolean strict) |
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.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. |
private static ContentType |
ContentType.create(java.lang.String mimeType,
NameValuePair[] params,
boolean strict) |
static ContentType |
ContentType.create(java.lang.String mimeType,
java.lang.String charset)
Creates a new instance of
ContentType . |
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.nio.charset.Charset charset)
Creates a new instance with this MIME type and the given Charset.
|
ContentType |
ContentType.withCharset(java.lang.String charset)
Creates a new instance with this MIME type and the given Charset name.
|
ContentType |
ContentType.withParameters(NameValuePair... params)
Creates a new instance with this MIME type and the given parameters.
|
Constructor and Description |
---|
ByteArrayEntity(byte[] b,
ContentType contentType) |
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType) |
FileEntity(java.io.File file,
ContentType contentType) |
InputStreamEntity(java.io.InputStream instream,
ContentType contentType)
Creates an entity with a content type and unknown length.
|
InputStreamEntity(java.io.InputStream instream,
long length,
ContentType contentType) |
StringEntity(java.lang.String string,
ContentType contentType)
Creates a StringEntity with the specified content and content type.
|
Constructor and Description |
---|
NByteArrayEntity(byte[] b,
ContentType contentType) |
NByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType) |
NFileEntity(java.io.File file,
ContentType contentType)
Creates new instance of NFileEntity from the given source
File
with the given content type. |
NFileEntity(java.io.File file,
ContentType contentType,
boolean useFileChannels)
Creates new instance of NFileEntity from the given source
File
with the given content type. |
NStringEntity(java.lang.String s,
ContentType contentType)
Creates a NStringEntity with the specified content and content type.
|
Modifier and Type | Method and Description |
---|---|
protected ContentType |
AbstractAsyncResponseConsumer.getContentType(HttpEntity entity) |
Modifier and Type | Method and Description |
---|---|
protected void |
BasicAsyncResponseConsumer.onEntityEnclosed(HttpEntity entity,
ContentType contentType) |
protected abstract void |
AbstractAsyncResponseConsumer.onEntityEnclosed(HttpEntity entity,
ContentType contentType)
Invoked if the response message encloses a content entity.
|
protected abstract void |
AbstractAsyncRequestConsumer.onEntityEnclosed(HttpEntity entity,
ContentType contentType)
Invoked if the request message encloses a content entity.
|
protected void |
BasicAsyncRequestConsumer.onEntityEnclosed(HttpEntity entity,
ContentType contentType) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
EntityUtils.toString(HttpEntity entity,
ContentType contentType) |