| 程序包 | 说明 |
|---|---|
| org.apache.hc.client5.http |
Client component APIs common to all client transports
such as connection route information and resolution
as well as common HTTP method definitions and
exception classes.
|
| org.apache.hc.client5.http.async.methods |
Common HTTP methods and message handlers for the asynchronous I/O model.
|
| org.apache.hc.client5.http.entity |
Client specific HTTP entity implementations.
|
| org.apache.hc.client5.http.entity.mime |
MIME coded HTTP entity implementations.
|
| 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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ContentType |
HttpResponseException.getContentType() |
| 构造器和说明 |
|---|
HttpResponseException(int statusCode,
String reasonPhrase,
byte[] contentBytes,
ContentType contentType)
Constructs a new instance of
HttpResponseException with the given
status code, reason phrase, content bytes, and content type. |
| 限定符和类型 | 方法和说明 |
|---|---|
ContentType |
SimpleHttpRequest.getContentType() |
ContentType |
SimpleBody.getContentType() |
ContentType |
SimpleHttpResponse.getContentType() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected SimpleHttpResponse |
SimpleResponseConsumer.buildResult(HttpResponse response,
byte[] entity,
ContentType contentType) |
static SimpleHttpResponse |
SimpleHttpResponse.create(int code,
byte[] content,
ContentType contentType) |
static SimpleHttpResponse |
SimpleHttpResponse.create(int code,
String content,
ContentType contentType) |
void |
SimpleHttpRequest.setBody(byte[] bodyBytes,
ContentType contentType) |
SimpleRequestBuilder |
SimpleRequestBuilder.setBody(byte[] content,
ContentType contentType) |
void |
SimpleHttpResponse.setBody(byte[] bodyBytes,
ContentType contentType) |
SimpleResponseBuilder |
SimpleResponseBuilder.setBody(byte[] content,
ContentType contentType) |
void |
SimpleHttpRequest.setBody(String bodyText,
ContentType contentType) |
SimpleRequestBuilder |
SimpleRequestBuilder.setBody(String content,
ContentType contentType) |
void |
SimpleHttpResponse.setBody(String bodyText,
ContentType contentType) |
SimpleResponseBuilder |
SimpleResponseBuilder.setBody(String content,
ContentType contentType) |
protected abstract void |
AbstractBinPushConsumer.start(HttpRequest promise,
HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of response processing.
|
protected abstract void |
AbstractCharPushConsumer.start(HttpRequest promise,
HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of data processing.
|
protected abstract void |
AbstractBinResponseConsumer.start(HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of response processing.
|
protected abstract void |
AbstractCharResponseConsumer.start(HttpResponse response,
ContentType contentType)
Triggered to signal the beginning of data processing.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ContentType |
EntityBuilder.getContentType()
Gets the
ContentType of the entity, may be null. |
| 限定符和类型 | 方法和说明 |
|---|---|
EntityBuilder |
EntityBuilder.setContentType(ContentType contentType)
Sets the
ContentType of the entity. |
| 限定符和类型 | 方法和说明 |
|---|---|
ContentType |
AbstractContentBody.getContentType() |
| 限定符和类型 | 方法和说明 |
|---|---|
MultipartEntityBuilder |
MultipartEntityBuilder.addBinaryBody(String name,
byte[] b,
ContentType contentType,
String filename) |
MultipartEntityBuilder |
MultipartEntityBuilder.addBinaryBody(String name,
File file,
ContentType contentType,
String filename) |
MultipartEntityBuilder |
MultipartEntityBuilder.addBinaryBody(String name,
InputStream stream,
ContentType contentType,
String filename) |
MultipartEntityBuilder |
MultipartEntityBuilder.addTextBody(String name,
String text,
ContentType contentType) |
MultipartEntityBuilder |
MultipartEntityBuilder.setContentType(ContentType contentType) |
| 构造器和说明 |
|---|
AbstractContentBody(ContentType contentType) |
ByteArrayBody(byte[] data,
ContentType contentType)
Public constructor that creates a new ByteArrayBody.
|
ByteArrayBody(byte[] data,
ContentType contentType,
String filename) |
FileBody(File file,
ContentType contentType) |
FileBody(File file,
ContentType contentType,
String filename) |
InputStreamBody(InputStream in,
ContentType contentType) |
InputStreamBody(InputStream in,
ContentType contentType,
String filename) |
InputStreamBody(InputStream in,
ContentType contentType,
String filename,
long contentLength) |
StringBody(String text,
ContentType contentType) |
| 限定符和类型 | 字段和说明 |
|---|---|
static ContentType |
ContentType.APPLICATION_ATOM_XML |
static ContentType |
ContentType.APPLICATION_FORM_URLENCODED |
static ContentType |
ContentType.APPLICATION_JSON |
static ContentType |
ContentType.APPLICATION_NDJSON
Public constant media type for
application/x-ndjson. |
static ContentType |
ContentType.APPLICATION_OCTET_STREAM |
static ContentType |
ContentType.APPLICATION_PDF
Public constant media type for
application/pdf. |
static ContentType |
ContentType.APPLICATION_PROBLEM_JSON
Public constant media type for
application/problem+json. |
static ContentType |
ContentType.APPLICATION_PROBLEM_XML
Public constant media type for
application/problem+xml. |
static ContentType |
ContentType.APPLICATION_RSS_XML
Public constant media type for
application/rss+xml. |
static ContentType |
ContentType.APPLICATION_SOAP_XML |
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.IMAGE_BMP |
static ContentType |
ContentType.IMAGE_GIF |
static ContentType |
ContentType.IMAGE_JPEG |
static ContentType |
ContentType.IMAGE_PNG |
static ContentType |
ContentType.IMAGE_SVG |
static ContentType |
ContentType.IMAGE_TIFF |
static ContentType |
ContentType.IMAGE_WEBP |
static ContentType |
ContentType.MULTIPART_FORM_DATA |
static ContentType |
ContentType.MULTIPART_MIXED
Public constant media type for
multipart/mixed. |
static ContentType |
ContentType.MULTIPART_RELATED
Public constant media type for
multipart/related. |
static ContentType |
ContentType.TEXT_EVENT_STREAM
Public constant media type for
text/event-stream. |
static ContentType |
ContentType.TEXT_HTML |
static ContentType |
ContentType.TEXT_MARKDOWN
Public constant media type for
text/markdown. |
static ContentType |
ContentType.TEXT_PLAIN |
static ContentType |
ContentType.TEXT_XML |
static ContentType |
ContentType.WILDCARD |
| 限定符和类型 | 方法和说明 |
|---|---|
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,
NameValuePair... params)
Creates a new instance of
ContentType with the given parameters. |
static ContentType |
ContentType.create(String mimeType,
String charset)
Creates a new instance of
ContentType. |
static ContentType |
ContentType.getByMimeType(String mimeType)
已过时。
Do not use. This method was made public by mistake.
|
static ContentType |
ContentType.parse(CharSequence s)
Parses textual representation of
Content-Type value. |
static ContentType |
ContentType.parseLenient(CharSequence s)
Parses textual representation of
Content-Type value ignoring invalid charsets. |
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.
|
ContentType |
ContentType.withParameters(NameValuePair... params)
Creates a new instance with this MIME type and the given parameters.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Charset |
ContentType.getCharset(ContentType contentType,
Charset defaultCharset)
Gets a ContentType's Charset if neither are null, otherwise, return the given
defaultCharset. |
boolean |
ContentType.isSameMimeType(ContentType contentType) |
| 构造器和说明 |
|---|
BasicEntityDetails(long len,
ContentType contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpEntity |
HttpEntities.create(byte[] content,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(byte[] content,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.create(File content,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(File content,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.create(IOCallback<OutputStream> callback,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(IOCallback<OutputStream> callback,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.create(Path content,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(Path content,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.create(Serializable serializable,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(Serializable serializable,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.create(String content,
ContentType contentType) |
static HttpEntity |
HttpEntities.create(String content,
ContentType contentType,
Header... trailers) |
static HttpEntity |
HttpEntities.createGzipped(byte[] content,
ContentType contentType) |
static HttpEntity |
HttpEntities.createGzipped(File content,
ContentType contentType) |
static HttpEntity |
HttpEntities.createGzipped(IOCallback<OutputStream> callback,
ContentType contentType) |
static HttpEntity |
HttpEntities.createGzipped(Path content,
ContentType contentType) |
static HttpEntity |
HttpEntities.createGzipped(Serializable serializable,
ContentType contentType) |
static HttpEntity |
HttpEntities.createGzipped(String content,
ContentType contentType) |
| 构造器和说明 |
|---|
AbstractHttpEntity(ContentType contentType,
String contentEncoding) |
AbstractHttpEntity(ContentType contentType,
String contentEncoding,
boolean chunked) |
BasicHttpEntity(InputStream content,
ContentType contentType) |
BasicHttpEntity(InputStream content,
ContentType contentType,
boolean chunked) |
BasicHttpEntity(InputStream content,
ContentType contentType,
String contentEncoding) |
BasicHttpEntity(InputStream content,
long length,
ContentType contentType) |
BasicHttpEntity(InputStream content,
long length,
ContentType contentType,
String contentEncoding) |
BasicHttpEntity(InputStream content,
long length,
ContentType contentType,
String contentEncoding,
boolean chunked) |
ByteArrayEntity(byte[] b,
ContentType contentType) |
ByteArrayEntity(byte[] b,
ContentType contentType,
boolean chunked) |
ByteArrayEntity(byte[] b,
ContentType contentType,
String contentEncoding) |
ByteArrayEntity(byte[] b,
ContentType contentType,
String contentEncoding,
boolean chunked) |
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType) |
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType,
boolean chunked) |
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType,
String contentEncoding) |
ByteArrayEntity(byte[] b,
int off,
int len,
ContentType contentType,
String contentEncoding,
boolean chunked) |
ByteBufferEntity(ByteBuffer buffer,
ContentType contentType) |
ByteBufferEntity(ByteBuffer buffer,
ContentType contentType,
String contentEncoding) |
EntityTemplate(long contentLength,
ContentType contentType,
String contentEncoding,
IOCallback<OutputStream> callback) |
FileEntity(File file,
ContentType contentType) |
FileEntity(File file,
ContentType contentType,
String contentEncoding) |
InputStreamEntity(InputStream inStream,
ContentType contentType) |
InputStreamEntity(InputStream inStream,
long length,
ContentType contentType) |
InputStreamEntity(InputStream inStream,
long length,
ContentType contentType,
String contentEncoding) |
PathEntity(Path path,
ContentType contentType) |
PathEntity(Path path,
ContentType contentType,
String contentEncoding) |
SerializableEntity(Serializable serializable,
ContentType contentType)
Creates new instance of this class.
|
SerializableEntity(Serializable serializable,
ContentType contentType,
String contentEncoding)
Creates new instance of this class.
|
StringEntity(String string,
ContentType contentType) |
StringEntity(String string,
ContentType contentType,
boolean chunked) |
StringEntity(String string,
ContentType contentType,
String contentEncoding,
boolean chunked)
Creates a StringEntity with the specified content and content type.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ClassicRequestBuilder |
ClassicRequestBuilder.setEntity(byte[] content,
ContentType contentType) |
ClassicResponseBuilder |
ClassicResponseBuilder.setEntity(byte[] content,
ContentType contentType) |
ClassicRequestBuilder |
ClassicRequestBuilder.setEntity(String content,
ContentType contentType) |
ClassicResponseBuilder |
ClassicResponseBuilder.setEntity(String content,
ContentType contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
static AsyncEntityProducer |
AsyncEntityProducers.create(byte[] content,
ContentType contentType) |
static AsyncEntityProducer |
AsyncEntityProducers.create(byte[] content,
ContentType contentType,
Header... trailers) |
static AsyncEntityProducer |
AsyncEntityProducers.create(File content,
ContentType contentType) |
static AsyncEntityProducer |
AsyncEntityProducers.create(File content,
ContentType contentType,
Header... trailers) |
static AsyncEntityProducer |
AsyncEntityProducers.create(Path content,
ContentType contentType,
Header... trailers) |
static AsyncEntityProducer |
AsyncEntityProducers.create(Path content,
ContentType contentType,
OpenOption... options) |
static AsyncEntityProducer |
AsyncEntityProducers.create(String content,
ContentType contentType) |
static AsyncEntityProducer |
AsyncEntityProducers.create(String content,
ContentType contentType,
Header... trailers) |
static AsyncEntityProducer |
AsyncEntityProducers.createBinary(Callback<StreamChannel<ByteBuffer>> callback,
ContentType contentType) |
static AsyncEntityProducer |
AsyncEntityProducers.createBinary(Callback<StreamChannel<ByteBuffer>> callback,
ContentType contentType,
Header... trailers) |
static AsyncEntityProducer |
AsyncEntityProducers.createText(Callback<StreamChannel<CharBuffer>> callback,
ContentType contentType) |
static AsyncEntityProducer |
AsyncEntityProducers.createText(Callback<StreamChannel<CharBuffer>> callback,
ContentType contentType,
Header... trailers) |
protected abstract void |
AbstractBinAsyncEntityConsumer.streamStart(ContentType contentType)
Triggered to signal beginning of entity content stream.
|
protected void |
StringAsyncEntityConsumer.streamStart(ContentType contentType) |
protected abstract void |
AbstractCharAsyncEntityConsumer.streamStart(ContentType contentType)
Triggered to signal beginning of entity content stream.
|
protected void |
BasicAsyncEntityConsumer.streamStart(ContentType contentType) |
| 构造器和说明 |
|---|
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(CharSequence content,
ContentType contentType) |
BasicAsyncEntityProducer(CharSequence content,
ContentType contentType,
boolean chunked) |
FileEntityProducer(File file,
ContentType contentType) |
FileEntityProducer(File file,
ContentType contentType,
boolean chunked) |
FileEntityProducer(File file,
int bufferSize,
ContentType contentType,
boolean chunked) |
PathEntityProducer(Path file,
ContentType contentType,
boolean chunked,
OpenOption... openOptions) |
PathEntityProducer(Path file,
ContentType contentType,
OpenOption... openOptions) |
PathEntityProducer(Path file,
int bufferSize,
ContentType contentType,
boolean chunked,
OpenOption... openOptions) |
StringAsyncEntityProducer(CharSequence content,
ContentType contentType) |
StringAsyncEntityProducer(CharSequence content,
int bufferSize,
ContentType contentType) |
StringAsyncEntityProducer(CharSequence content,
int bufferSize,
int fragmentSizeHint,
ContentType contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract T |
AbstractAsyncRequesterConsumer.buildResult(HttpRequest request,
E entity,
ContentType contentType)
Triggered to generate object that represents a result of request message processing.
|
protected abstract T |
AbstractAsyncResponseConsumer.buildResult(HttpResponse response,
E entity,
ContentType contentType)
Triggered to generate object that represents a result of response message processing.
|
AsyncPushBuilder |
AsyncPushBuilder.setEntity(byte[] content,
ContentType contentType) |
AsyncResponseBuilder |
AsyncResponseBuilder.setEntity(byte[] content,
ContentType contentType) |
AsyncRequestBuilder |
AsyncRequestBuilder.setEntity(byte[] content,
ContentType contentType) |
AsyncPushBuilder |
AsyncPushBuilder.setEntity(String content,
ContentType contentType) |
AsyncResponseBuilder |
AsyncResponseBuilder.setEntity(String content,
ContentType contentType) |
AsyncRequestBuilder |
AsyncRequestBuilder.setEntity(String content,
ContentType contentType) |
| 构造器和说明 |
|---|
BasicResponseProducer(HttpResponse response,
String message,
ContentType contentType) |
BasicResponseProducer(int code,
String message,
ContentType contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract T |
AbstractClassicEntityConsumer.consumeData(ContentType contentType,
InputStream inputStream)
Processes entity data from the given stream.
|
protected abstract void |
AbstractClassicEntityProducer.produceData(ContentType contentType,
OutputStream outputStream)
Writes out entity data into the given stream.
|
| 构造器和说明 |
|---|
AbstractClassicEntityProducer(int initialBufferSize,
ContentType contentType,
Executor executor) |
Copyright © 2023. All rights reserved.