Uses of Class
org.apache.hc.core5.http.ContentType
-
Packages that use ContentType Package Description org.apache.hc.core5.http Core HTTP transport component APIs.org.apache.hc.core5.http.impl Default implementations of core HTTP APIs.org.apache.hc.core5.http.io.entity HTTP message entity APIs based on the classic (blocking) I/O model.org.apache.hc.core5.http.io.support Support classes for the classic (blocking) I/O model.org.apache.hc.core5.http.nio.entity HTTP message entity APIs based on the asynchronous (non-blocking) I/O model.org.apache.hc.core5.http.nio.support Support classes for the asynchronous I/O model.org.apache.hc.core5.http.nio.support.classic Support classes for the asynchronous I/O model that emulate behavior of the classic (blocking) I/O model. -
-
Uses of ContentType in org.apache.hc.core5.http
Fields in org.apache.hc.core5.http declared as ContentType Modifier and Type Field Description static ContentTypeContentType. APPLICATION_ATOM_XMLstatic ContentTypeContentType. APPLICATION_FORM_URLENCODEDstatic ContentTypeContentType. APPLICATION_JSONstatic ContentTypeContentType. APPLICATION_NDJSONPublic constant media type forapplication/x-ndjson.static ContentTypeContentType. APPLICATION_OCTET_STREAMstatic ContentTypeContentType. APPLICATION_PDFPublic constant media type forapplication/pdf.static ContentTypeContentType. APPLICATION_PROBLEM_JSONPublic constant media type forapplication/problem+json.static ContentTypeContentType. APPLICATION_PROBLEM_XMLPublic constant media type forapplication/problem+xml.static ContentTypeContentType. APPLICATION_RSS_XMLPublic constant media type forapplication/rss+xml.static ContentTypeContentType. APPLICATION_SOAP_XMLstatic ContentTypeContentType. APPLICATION_SVG_XMLstatic ContentTypeContentType. APPLICATION_XHTML_XMLstatic ContentTypeContentType. APPLICATION_XMLstatic ContentTypeContentType. APPLICATION_ZIP_COMPRESSEDPublic constant media type for ZIP archivesapplication/x-zip-compressed.static ContentTypeContentType. DEFAULT_BINARYstatic ContentTypeContentType. DEFAULT_TEXTstatic ContentTypeContentType. IMAGE_BMPstatic ContentTypeContentType. IMAGE_GIFstatic ContentTypeContentType. IMAGE_JPEGstatic ContentTypeContentType. IMAGE_PNGstatic ContentTypeContentType. IMAGE_SVGstatic ContentTypeContentType. IMAGE_TIFFstatic ContentTypeContentType. IMAGE_WEBPstatic ContentTypeContentType. MULTIPART_FORM_DATAstatic ContentTypeContentType. MULTIPART_MIXEDPublic constant media type formultipart/mixed.static ContentTypeContentType. MULTIPART_RELATEDPublic constant media type formultipart/related.static ContentTypeContentType. TEXT_EVENT_STREAMPublic constant media type fortext/event-stream.static ContentTypeContentType. TEXT_HTMLstatic ContentTypeContentType. TEXT_MARKDOWNPublic constant media type fortext/markdown.static ContentTypeContentType. TEXT_PLAINstatic ContentTypeContentType. TEXT_XMLstatic ContentTypeContentType. WILDCARDMethods in org.apache.hc.core5.http that return ContentType Modifier and Type Method Description static ContentTypeContentType. create(java.lang.String mimeType)Creates a new instance ofContentTypewithout a charset.static ContentTypeContentType. create(java.lang.String mimeType, java.lang.String charset)Creates a new instance ofContentType.static ContentTypeContentType. create(java.lang.String mimeType, java.nio.charset.Charset charset)Creates a new instance ofContentType.static ContentTypeContentType. create(java.lang.String mimeType, NameValuePair... params)Creates a new instance ofContentTypewith the given parameters.static ContentTypeContentType. getByMimeType(java.lang.String mimeType)Deprecated.Do not use.static ContentTypeContentType. parse(java.lang.CharSequence s)Parses textual representation ofContent-Typevalue.static ContentTypeContentType. parse(java.lang.CharSequence s, ParserCursor cursor)static ContentTypeContentType. parseLenient(java.lang.CharSequence s)Parses textual representation ofContent-Typevalue ignoring invalid charsets.static ContentTypeContentType. parseLenient(java.lang.CharSequence s, ParserCursor cursor)ContentTypeContentType. withCharset(java.lang.String charset)Creates a new instance with this MIME type and the given Charset name.ContentTypeContentType. withCharset(java.nio.charset.Charset charset)Creates a new instance with this MIME type and the given Charset.ContentTypeContentType. withParameters(NameValuePair... params)Creates a new instance with this MIME type and the given parameters.Methods in org.apache.hc.core5.http with parameters of type ContentType Modifier and Type Method Description static java.nio.charset.CharsetContentType. getCharset(ContentType contentType, java.nio.charset.Charset defaultCharset)Gets a ContentType's Charset if neither are null, otherwise, return the givendefaultCharset.booleanContentType. isSameMimeType(ContentType contentType)Constructors in org.apache.hc.core5.http with parameters of type ContentType Constructor Description UnsupportedMediaTypeException(ContentType contentType)Creates an exception with a detail message for the given ContentType. -
Uses of ContentType in org.apache.hc.core5.http.impl
Constructors in org.apache.hc.core5.http.impl with parameters of type ContentType Constructor Description BasicEntityDetails(long len, ContentType contentType) -
Uses of ContentType in org.apache.hc.core5.http.io.entity
Methods in org.apache.hc.core5.http.io.entity with parameters of type ContentType Modifier and Type Method Description static HttpEntityHttpEntities. create(byte[] content, ContentType contentType)static HttpEntityHttpEntities. create(byte[] content, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. create(java.io.File content, ContentType contentType)static HttpEntityHttpEntities. create(java.io.File content, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. create(java.io.Serializable serializable, ContentType contentType)static HttpEntityHttpEntities. create(java.io.Serializable serializable, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. create(java.lang.String content, ContentType contentType)static HttpEntityHttpEntities. create(java.lang.String content, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. create(java.nio.file.Path content, ContentType contentType)static HttpEntityHttpEntities. create(java.nio.file.Path content, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. create(IOCallback<java.io.OutputStream> callback, ContentType contentType)static HttpEntityHttpEntities. create(IOCallback<java.io.OutputStream> callback, ContentType contentType, Header... trailers)static HttpEntityHttpEntities. createGzipped(byte[] content, ContentType contentType)static HttpEntityHttpEntities. createGzipped(java.io.File content, ContentType contentType)static HttpEntityHttpEntities. createGzipped(java.io.Serializable serializable, ContentType contentType)static HttpEntityHttpEntities. createGzipped(java.lang.String content, ContentType contentType)static HttpEntityHttpEntities. createGzipped(java.nio.file.Path content, ContentType contentType)static HttpEntityHttpEntities. createGzipped(IOCallback<java.io.OutputStream> callback, ContentType contentType)Constructors in org.apache.hc.core5.http.io.entity with parameters of type ContentType Constructor Description AbstractHttpEntity(ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.AbstractHttpEntity(ContentType contentType, java.lang.String contentEncoding, boolean chunked)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, long contentLength, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, long contentLength, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, long contentLength, ContentType contentType, java.lang.String contentEncoding, boolean chunked)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, ContentType contentType, boolean chunked)Constructs a new instance with the given attributes kept as immutable.BasicHttpEntity(java.io.InputStream content, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, int off, int len, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, int off, int len, ContentType contentType, boolean chunked)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, int off, int len, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, int off, int len, ContentType contentType, java.lang.String contentEncoding, boolean chunked)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, ContentType contentType, boolean chunked)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.ByteArrayEntity(byte[] buf, ContentType contentType, java.lang.String contentEncoding, boolean chunked)Constructs a new instance with the given attributes kept as immutable.ByteBufferEntity(java.nio.ByteBuffer buffer, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.ByteBufferEntity(java.nio.ByteBuffer buffer, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.EntityTemplate(long contentLength, ContentType contentType, java.lang.String contentEncoding, IOCallback<java.io.OutputStream> callback)Constructs a new instance with the given attributes kept as immutable.EntityTemplate(long contentLength, ContentType contentType, IOCallback<java.io.OutputStream> callback)EntityTemplate(ContentType contentType, IOCallback<java.io.OutputStream> callback)FileEntity(java.io.File file, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.FileEntity(java.io.File file, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.InputStreamEntity(java.io.InputStream content, long contentLength, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.InputStreamEntity(java.io.InputStream content, long contentLength, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.InputStreamEntity(java.io.InputStream content, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.PathEntity(java.nio.file.Path path, ContentType contentType)Constructs a new instance with the given attributes kept as immutable.PathEntity(java.nio.file.Path path, ContentType contentType, java.lang.String contentEncoding)Constructs a new instance with the given attributes kept as immutable.SerializableEntity(java.io.Serializable serializable, ContentType contentType)Creates new instance of this class.SerializableEntity(java.io.Serializable serializable, ContentType contentType, java.lang.String contentEncoding)Creates new instance of this class.StringEntity(java.lang.String string, ContentType contentType)Constructs a StringEntity with the specified content and content type.StringEntity(java.lang.String string, ContentType contentType, boolean chunked)Constructs a StringEntity with the specified content and content type.StringEntity(java.lang.String string, ContentType contentType, java.lang.String contentEncoding, boolean chunked)Constructs a StringEntity with the specified content and content type. -
Uses of ContentType in org.apache.hc.core5.http.io.support
Methods in org.apache.hc.core5.http.io.support with parameters of type ContentType Modifier and Type Method Description ClassicRequestBuilderClassicRequestBuilder. setEntity(byte[] content, ContentType contentType)ClassicRequestBuilderClassicRequestBuilder. setEntity(java.lang.String content, ContentType contentType)ClassicResponseBuilderClassicResponseBuilder. setEntity(byte[] content, ContentType contentType)ClassicResponseBuilderClassicResponseBuilder. setEntity(java.lang.String content, ContentType contentType) -
Uses of ContentType in org.apache.hc.core5.http.nio.entity
Methods in org.apache.hc.core5.http.nio.entity with parameters of type ContentType Modifier and Type Method Description static AsyncEntityProducerAsyncEntityProducers. create(byte[] content, ContentType contentType)static AsyncEntityProducerAsyncEntityProducers. create(byte[] content, ContentType contentType, Header... trailers)static AsyncEntityProducerAsyncEntityProducers. create(java.io.File content, ContentType contentType)static AsyncEntityProducerAsyncEntityProducers. create(java.io.File content, ContentType contentType, Header... trailers)static AsyncEntityProducerAsyncEntityProducers. create(java.lang.String content, ContentType contentType)static AsyncEntityProducerAsyncEntityProducers. create(java.lang.String content, ContentType contentType, Header... trailers)static AsyncEntityProducerAsyncEntityProducers. create(java.nio.file.Path content, ContentType contentType, java.nio.file.OpenOption... options)static AsyncEntityProducerAsyncEntityProducers. create(java.nio.file.Path content, ContentType contentType, Header... trailers)static AsyncEntityProducerAsyncEntityProducers. createBinary(Callback<StreamChannel<java.nio.ByteBuffer>> callback, ContentType contentType)static AsyncEntityProducerAsyncEntityProducers. createBinary(Callback<StreamChannel<java.nio.ByteBuffer>> callback, ContentType contentType, Header... trailers)static AsyncEntityProducerAsyncEntityProducers. createText(Callback<StreamChannel<java.nio.CharBuffer>> callback, ContentType contentType)static AsyncEntityProducerAsyncEntityProducers. createText(Callback<StreamChannel<java.nio.CharBuffer>> callback, ContentType contentType, Header... trailers)protected abstract voidAbstractBinAsyncEntityConsumer. streamStart(ContentType contentType)Triggered to signal beginning of entity content stream.protected abstract voidAbstractCharAsyncEntityConsumer. streamStart(ContentType contentType)Triggered to signal beginning of entity content stream.protected voidBasicAsyncEntityConsumer. streamStart(ContentType contentType)protected voidCharSequenceAsyncEntityConsumer. streamStart(ContentType contentType)Constructors in org.apache.hc.core5.http.nio.entity with parameters of type ContentType Constructor Description AbstractBinAsyncEntityProducer(int fragmentSizeHint, ContentType contentType)AbstractCharAsyncEntityProducer(int bufferSize, int fragmentSizeHint, ContentType contentType)BasicAsyncEntityProducer(byte[] content, ContentType contentType)BasicAsyncEntityProducer(byte[] content, ContentType contentType, boolean chunked)BasicAsyncEntityProducer(java.lang.CharSequence content, ContentType contentType)BasicAsyncEntityProducer(java.lang.CharSequence content, ContentType contentType, boolean chunked)FileEntityProducer(java.io.File file, int bufferSize, ContentType contentType, boolean chunked)FileEntityProducer(java.io.File file, ContentType contentType)FileEntityProducer(java.io.File file, ContentType contentType, boolean chunked)PathEntityProducer(java.nio.file.Path file, int bufferSize, ContentType contentType, boolean chunked, java.nio.file.OpenOption... openOptions)PathEntityProducer(java.nio.file.Path file, ContentType contentType, boolean chunked, java.nio.file.OpenOption... openOptions)PathEntityProducer(java.nio.file.Path file, ContentType contentType, java.nio.file.OpenOption... openOptions)StringAsyncEntityProducer(java.lang.CharSequence content, int bufferSize, int fragmentSizeHint, ContentType contentType)StringAsyncEntityProducer(java.lang.CharSequence content, int bufferSize, ContentType contentType)StringAsyncEntityProducer(java.lang.CharSequence content, ContentType contentType) -
Uses of ContentType in org.apache.hc.core5.http.nio.support
Methods in org.apache.hc.core5.http.nio.support with parameters of type ContentType Modifier and Type Method Description AsyncClientPipeline.ResponseStageAsyncClientPipeline.RequestContentStage. asByteArray(byte[] bytes, ContentType contentType)Configures the pipeline to represent the outgoing message content as a byte array.AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,byte[]>>AsyncServerPipeline.ResponseContentStage. asByteArray(ContentType contentType)Configures the pipeline to represent the response message content as byre array.AsyncClientPipeline.ResponseStageAsyncClientPipeline.RequestContentStage. asString(java.lang.String s, ContentType contentType)Configures the pipeline to represent the outgoing message content as a String.AsyncServerPipeline.RequestHandlingStage<I,Message<HttpResponse,java.lang.String>>AsyncServerPipeline.ResponseContentStage. asString(ContentType contentType)Configures the pipeline to represent the response message content as a String.protected abstract TAbstractAsyncRequesterConsumer. buildResult(HttpRequest request, E entity, ContentType contentType)Triggered to generate object that represents a result of request message processing.protected abstract TAbstractAsyncResponseConsumer. buildResult(HttpResponse response, E entity, ContentType contentType)Triggered to generate object that represents a result of response message processing.AsyncPushBuilderAsyncPushBuilder. setEntity(byte[] content, ContentType contentType)AsyncPushBuilderAsyncPushBuilder. setEntity(java.lang.String content, ContentType contentType)AsyncRequestBuilderAsyncRequestBuilder. setEntity(byte[] content, ContentType contentType)AsyncRequestBuilderAsyncRequestBuilder. setEntity(java.lang.String content, ContentType contentType)AsyncResponseBuilderAsyncResponseBuilder. setEntity(byte[] content, ContentType contentType)AsyncResponseBuilderAsyncResponseBuilder. setEntity(java.lang.String content, ContentType contentType)Method parameters in org.apache.hc.core5.http.nio.support with type arguments of type ContentType Modifier and Type Method Description <T> AsyncClientPipeline.ResultStage<Message<HttpResponse,T>>AsyncClientPipeline.ResponseContentStage. consumeContent(Resolver<ContentType,Supplier<AsyncEntityConsumer<T>>> dataConsumerResolver)ConfiguresAsyncEntityConsumersupplier to be used by the pipeline to process the incoming response content stream.<T> AsyncServerPipeline.ResponseStage<Message<HttpRequest,T>>AsyncServerPipeline.RequestContentStage. consumeContent(Resolver<ContentType,Supplier<AsyncEntityConsumer<T>>> dataConsumerResolver)ResolvesAsyncEntityConsumerto be used by the pipeline to process the incoming request content stream.Constructors in org.apache.hc.core5.http.nio.support with parameters of type ContentType Constructor Description BasicResponseProducer(int code, java.lang.String message, ContentType contentType)BasicResponseProducer(HttpResponse response, java.lang.String message, ContentType contentType) -
Uses of ContentType in org.apache.hc.core5.http.nio.support.classic
Methods in org.apache.hc.core5.http.nio.support.classic with parameters of type ContentType Modifier and Type Method Description protected abstract TAbstractClassicEntityConsumer. consumeData(ContentType contentType, java.io.InputStream inputStream)Deprecated.Processes entity data from the given stream.protected abstract voidAbstractClassicEntityProducer. produceData(ContentType contentType, java.io.OutputStream outputStream)Deprecated.Writes out entity data into the given stream.Constructors in org.apache.hc.core5.http.nio.support.classic with parameters of type ContentType Constructor Description AbstractClassicEntityProducer(int initialBufferSize, ContentType contentType, java.util.concurrent.Executor executor)Deprecated.
-