Uses of Class
org.apache.http.entity.ContentType
-
Packages that use ContentType 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. -
-
Uses of ContentType in org.apache.http.entity
Methods in org.apache.http.entity that return ContentType Modifier and Type Method Description static ContentType
ContentType. create(String mimeType)
Creates a new instance ofContentType
without a charset.static ContentType
ContentType. create(String mimeType, String charset)
Creates a new instance ofContentType
.static ContentType
ContentType. create(String mimeType, Charset charset)
Creates a new instance ofContentType
.static ContentType
ContentType. create(String mimeType, NameValuePair... params)
Creates a new instance ofContentType
with the given parameters.static ContentType
ContentType. get(HttpEntity entity)
ExtractsContent-Type
value fromHttpEntity
exactly as specified by theContent-Type
header of the entity.static ContentType
ContentType. getByMimeType(String mimeType)
ReturnsContent-Type
for the given MIME type.static ContentType
ContentType. getLenient(HttpEntity entity)
ExtractsContent-Type
value fromHttpEntity
.static ContentType
ContentType. getLenientOrDefault(HttpEntity entity)
ExtractsContent-Type
value fromHttpEntity
or returns the default valueDEFAULT_TEXT
if not explicitly specified or incorrect (could not be parsed).static ContentType
ContentType. getOrDefault(HttpEntity entity)
ExtractsContent-Type
value fromHttpEntity
or returns the default valueDEFAULT_TEXT
if not explicitly specified.static ContentType
ContentType. parse(String s)
Parses textual representation ofContent-Type
value.ContentType
ContentType. withCharset(String charset)
Creates a new instance with this MIME type and the given Charset name.ContentType
ContentType. withCharset(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.Constructors in org.apache.http.entity with parameters of type ContentType Constructor Description ByteArrayEntity(byte[] b, int off, int len, ContentType contentType)
ByteArrayEntity(byte[] b, ContentType contentType)
FileEntity(File file, ContentType contentType)
Creates a new instance.InputStreamEntity(InputStream inStream, long length, ContentType contentType)
InputStreamEntity(InputStream inStream, ContentType contentType)
Creates an entity with a content type and unknown length.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 Description NByteArrayEntity(byte[] b, int off, int len, ContentType contentType)
NByteArrayEntity(byte[] b, ContentType contentType)
NFileEntity(File file, ContentType contentType)
Creates new instance of NFileEntity from the given sourceFile
with the given content type.NFileEntity(File file, ContentType contentType, boolean useFileChannels)
Creates new instance of NFileEntity from the given sourceFile
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 that return ContentType Modifier and Type Method Description protected ContentType
AbstractAsyncResponseConsumer. getContentType(HttpEntity entity)
Methods in org.apache.http.nio.protocol with parameters of type ContentType Modifier and Type Method Description protected abstract void
AbstractAsyncRequestConsumer. onEntityEnclosed(HttpEntity entity, ContentType contentType)
Invoked if the request message encloses a content entity.protected abstract void
AbstractAsyncResponseConsumer. onEntityEnclosed(HttpEntity entity, ContentType contentType)
Invoked if the response message encloses a content entity.protected void
BasicAsyncRequestConsumer. onEntityEnclosed(HttpEntity entity, ContentType contentType)
protected void
BasicAsyncResponseConsumer. onEntityEnclosed(HttpEntity entity, ContentType contentType)
-