| Package | Description |
|---|---|
| org.aoju.bus.core.lang | |
| org.aoju.bus.http.bodys | |
| org.aoju.bus.http.magic | |
| org.aoju.bus.http.metric |
| Modifier and Type | Method and Description |
|---|---|
static MediaType |
MediaType.valueOf(String text)
返回媒体类型.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
MediaType.isCompatible(MediaType mediaType)
检查此媒体类型是否与其他媒体类型兼容
例如:image/*与image/jpeg、image/png等兼容
忽略媒体类型参数 这个函数是可交换的
|
| Modifier and Type | Method and Description |
|---|---|
abstract MediaType |
ResponseBody.contentType() |
abstract MediaType |
RequestBody.contentType() |
MediaType |
RealResponseBody.contentType() |
MediaType |
OutputStreamBody.contentType() |
MediaType |
MultipartBody.contentType() |
MediaType |
FormBody.contentType() |
MediaType |
MultipartBody.type() |
| Modifier and Type | Method and Description |
|---|---|
static ResponseBody |
ResponseBody.create(MediaType contentType,
byte[] content)
新的响应体,它传输
content |
static RequestBody |
RequestBody.create(MediaType contentType,
byte[] content)
发送
content的新请求体 |
static RequestBody |
RequestBody.create(MediaType contentType,
byte[] content,
int offset,
int byteCount)
发送
content的新请求体 |
static ResponseBody |
ResponseBody.create(MediaType contentType,
ByteString content)
新的响应体,它传输
content |
static RequestBody |
RequestBody.create(MediaType contentType,
ByteString content)
返回发送
content的新请求体 |
static RequestBody |
RequestBody.create(MediaType contentType,
File file)
新的请求体,该请求体传输
file的内容 |
static ResponseBody |
ResponseBody.create(MediaType contentType,
long contentLength,
BufferSource content)
新的响应体,它传输
content |
static ResponseBody |
ResponseBody.create(MediaType contentType,
String content)
返回一个传输
content的新响应体。如果contentType是非空且缺少字符集,则使用UTF-8 |
static RequestBody |
RequestBody.create(MediaType contentType,
String content)
返回传输
content的新请求体。
如果contentType是非空且缺少字符集,则使用UTF-8 |
MultipartBody.Builder |
MultipartBody.Builder.setType(MediaType type) |
| Modifier and Type | Method and Description |
|---|---|
MediaType |
FileInterceptor.DownloadFileProgressResponseBody.contentType() |
| Modifier and Type | Method and Description |
|---|---|
static RequestBody |
HttpRequest.createRequestBody(MediaType contentType,
InputStream is) |
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
DnsOverHttps.DNS_MESSAGE |
Copyright © 2020. All rights reserved.