## Uses of Class
org.apache.http.entity.ContentType

Packages that use ContentType
Package | Description
--- | ---
org.apache.http.entity | Common HTTP entity implementations.
org.apache.http.nio.entity | Common HTTP entity implementations with extensions for asynchronous (non-blocking) data transfer.
org.apache.http.nio.protocol | Asynchronous HTTP protocol handlers based on the non-blocking I/O model.

### Uses of ContentType in org.apache.http.entity

Fields in org.apache.http.entity declared as ContentType
Modifier and Type | Field and Description
--- | ---
`static ContentType` | ContentType.`APPLICATION_ATOM_XML`
`static ContentType` | ContentType.`APPLICATION_FORM_URLENCODED`
`static ContentType` | ContentType.`APPLICATION_JSON`
`static ContentType` | ContentType.`APPLICATION_OCTET_STREAM`
`static ContentType` | ContentType.`APPLICATION_SVG_XML`
`static ContentType` | ContentType.`APPLICATION_XHTML_XML`
`static ContentType` | ContentType.`APPLICATION_XML`
`static ContentType` | ContentType.`DEFAULT_BINARY`
`static ContentType` | ContentType.`DEFAULT_TEXT`
`static ContentType` | ContentType.`MULTIPART_FORM_DATA`
`static ContentType` | ContentType.`TEXT_HTML`
`static ContentType` | ContentType.`TEXT_PLAIN`
`static ContentType` | ContentType.`TEXT_XML`
`static ContentType` | ContentType.`WILDCARD`

Methods in org.apache.http.entity that return ContentType
Modifier and Type | Method and Description
--- | ---
`static ContentType` | ContentType.`create(String mimeType)` Creates a new instance of `ContentType` without a charset.
`static ContentType` | ContentType.`create(String mimeType, Charset charset)` Creates a new instance of `ContentType`.
`static ContentType` | ContentType.`create(String mimeType, 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.`getOrDefault(HttpEntity entity)` Extracts `Content-Type` value from `HttpEntity` or returns the default value `DEFAULT_TEXT` if not explicitly specified.
`static ContentType` | ContentType.`parse(String s)` Parses textual representation of `Content-Type` value.
`ContentType` | ContentType.`withCharset(Charset charset)` Creates a new instance with this MIME type and the given Charset.
`ContentType` | ContentType.`withCharset(String charset)` Creates a new instance with this MIME type and the given Charset name.

Constructors in org.apache.http.entity with parameters of type ContentType
Constructor and Description
`ByteArrayEntity(byte[] b, ContentType contentType)`
`ByteArrayEntity(byte[] b, int off, int len, ContentType contentType)`
`FileEntity(File file, ContentType contentType)`
`InputStreamEntity(InputStream instream, ContentType contentType)` Creates an entity with a content type and unknown length.
`InputStreamEntity(InputStream instream, long length, ContentType contentType)`
`StringEntity(String string, ContentType contentType)` Creates a StringEntity with the specified content and content type.

### Uses of ContentType in org.apache.http.nio.entity

Constructors in org.apache.http.nio.entity with parameters of type ContentType
Constructor and Description
`NByteArrayEntity(byte[] b, ContentType contentType)`
`NByteArrayEntity(byte[] b, int off, int len, ContentType contentType)`
`NFileEntity(File file, ContentType contentType)` Creates new instance of NFileEntity from the given source `File` with the given content type.
`NFileEntity(File file, ContentType contentType, boolean useFileChannels)` Creates new instance of NFileEntity from the given source `File` with the given content type.
`NStringEntity(String s, ContentType contentType)` Creates a NStringEntity with the specified content and content type.

### Uses of ContentType in org.apache.http.nio.protocol

Methods in org.apache.http.nio.protocol with parameters of type ContentType
Modifier and Type | Method and Description
--- | ---
`protected abstract void` | AbstractAsyncResponseConsumer.`onEntityEnclosed(HttpEntity entity, ContentType contentType)` Invoked if the response message encloses a content entity.
`protected void` | BasicAsyncResponseConsumer.`onEntityEnclosed(HttpEntity entity, ContentType contentType)`
`protected void` | BasicAsyncRequestConsumer.`onEntityEnclosed(HttpEntity entity, ContentType contentType)`
`protected abstract void` | AbstractAsyncRequestConsumer.`onEntityEnclosed(HttpEntity entity, ContentType contentType)` Invoked if the request message encloses a content entity.