![]() |
乐观的皮带 · pytorch推理 ...· 9 月前 · |
![]() |
逃课的黑框眼镜 · AttributeError: ...· 10 月前 · |
![]() |
豪爽的小狗 · 【异常解决】android.content. ...· 1 年前 · |
![]() |
八块腹肌的盒饭 · C# 中的.pdb/ ...· 1 年前 · |
![]() |
潇洒的斑马 · QListWidget滚动条自动滚到下方_q ...· 2 年前 · |
string mime graphql |
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/MediaType.html |
![]() |
内向的黄豆
2 年前 |
MimeType
that adds support for quality parameters
as defined in the HTTP specification.
MimeType.SpecificityComparator
<
T
extends
MimeType
>
application/x-www-form-urlencoded
.
static final
String
APPLICATION_FORM_URLENCODED
.
static final
MediaType
static final
MediaType
application/graphql-response+json
.
static final
String
APPLICATION_GRAPHQL_RESPONSE
.
static final
String
APPLICATION_GRAPHQL_RESPONSE_VALUE
static final
MediaType
application/json
.
static final
MediaType
APPLICATION_JSON
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
static final
String
APPLICATION_JSON_VALUE
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
static final
String
APPLICATION_JSON
.
static final
MediaType
application/x-ndjson
.
static final
String
APPLICATION_NDJSON
.
static final
MediaType
application/octet-stream
.
static final
String
APPLICATION_OCTET_STREAM
.
static final
MediaType
application/pdf
.
static final
String
APPLICATION_PDF
.
static final
MediaType
application/problem+json
.
static final
MediaType
APPLICATION_PROBLEM_JSON
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
static final
String
APPLICATION_PROBLEM_JSON_VALUE
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
static final
String
APPLICATION_PROBLEM_JSON
.
static final
MediaType
application/problem+xml
.
static final
String
APPLICATION_PROBLEM_XML
.
static final
MediaType
application/x-protobuf
.
static final
String
APPLICATION_PROTOBUF
.
static final
MediaType
application/rss+xml
.
static final
String
APPLICATION_RSS_XML
.
static final
MediaType
APPLICATION_STREAM_JSON_VALUE
.
static final
String
static final
MediaType
application/xhtml+xml
.
static final
String
APPLICATION_XHTML_XML
.
static final
MediaType
application/xml
.
static final
String
APPLICATION_XML
.
static final
MediaType
image/gif
.
static final
String
IMAGE_GIF
.
static final
MediaType
image/jpeg
.
static final
String
IMAGE_JPEG
.
static final
MediaType
image/png
.
static final
String
IMAGE_PNG
.
static final
MediaType
multipart/form-data
.
static final
String
MULTIPART_FORM_DATA
.
static final
MediaType
multipart/mixed
.
static final
String
MULTIPART_MIXED
.
static final
MediaType
multipart/related
.
static final
String
MULTIPART_RELATED
.
static final
Comparator
<
MediaType
>
static final
Comparator
<
MediaType
>
static final
MediaType
text/event-stream
.
static final
String
TEXT_EVENT_STREAM
.
static final
MediaType
text/html
.
static final
String
TEXT_HTML
.
static final
MediaType
text/markdown
.
static final
String
TEXT_MARKDOWN
.
static final
MediaType
text/plain
.
static final
String
TEXT_PLAIN
.
static final
MediaType
text/xml
.
static final
String
TEXT_XML
.
WILDCARD_TYPE
MediaType
for the given type, subtype, and quality value.
MediaType
for the given type, subtype, and character set.
MediaType
for the given type, subtype, and parameters.
MediaType
, and allows to set the specified character set.
MediaType
,
and allows for different parameters.
MediaType
for the given
MimeType
.
static
MediaType
asMediaType
(
MimeType
mimeType)
asMediaTypes
(
List
<
MimeType
> mimeTypes)
protected void
checkParameters
(
String
parameter,
String
value)
copyQualityValue
(
MediaType
mediaType)
MediaType
.
double
q
parameter, if any.
boolean
MediaType
includes the given media type.
boolean
isCompatibleWith
(
MediaType
other)
MediaType
is compatible with the given media type.
boolean
isLessSpecific
(
MimeType
other)
MediaType
more specific than the given type.
boolean
isMoreSpecific
(
MimeType
other)
MediaType
more specific than the given type.
static
MediaType
parseMediaType
(
String
mediaType)
MediaType
.
parseMediaTypes
(
String
mediaTypes)
MediaType
objects.
parseMediaTypes
(
List
<
String
> mediaTypes)
MediaType
objects.
static void
sortByQualityValue
(
List
<
MediaType
> mediaTypes)
static void
sortBySpecificity
(
List
<
MediaType
> mediaTypes)
MimeTypeUtils.sortBySpecificity(List)
static void
sortBySpecificityAndQuality
(
List
<
MediaType
> mediaTypes)
MimeTypeUtils.sortBySpecificity(List)
static
String
toString
(
Collection
<
MediaType
> mediaTypes)
MediaType
objects.
static
MediaType
MediaType
object,
with this method name following the 'valueOf' naming convention
(as supported by
ConversionService
.
appendTo
,
compareTo
,
equals
,
equalsTypeAndSubtype
,
getCharset
,
getParameter
,
getParameters
,
getSubtype
,
getSubtypeSuffix
,
getType
,
hashCode
,
includes
,
isCompatibleWith
,
isConcrete
,
isPresentIn
,
isWildcardSubtype
,
isWildcardType
,
toString
,
unquote
clone
,
finalize
,
getClass
,
notify
,
notifyAll
,
wait
,
wait
,
wait
APPLICATION_ATOM_XML
.
application/cbor
.
APPLICATION_CBOR
.
APPLICATION_FORM_URLENCODED
.
APPLICATION_GRAPHQL_RESPONSE
application/graphql+json
.
APPLICATION_GRAPHQL_RESPONSE_VALUE
APPLICATION_GRAPHQL
.
application/graphql-response+json
.
APPLICATION_GRAPHQL_RESPONSE
.
APPLICATION_JSON
.
APPLICATION_JSON_UTF8_VALUE
APPLICATION_JSON
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
application/json;charset=UTF-8
.
APPLICATION_JSON_VALUE
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
APPLICATION_JSON_UTF8
.
APPLICATION_OCTET_STREAM
.
application/pdf
.
APPLICATION_PDF
.
application/problem+json
.
APPLICATION_PROBLEM_JSON
.
APPLICATION_PROBLEM_JSON
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
application/problem+json
.
APPLICATION_PROBLEM_JSON_VALUE
since major browsers like Chrome
now comply with the specification and interpret correctly UTF-8 special
characters without requiring a
charset=UTF-8
parameter.
APPLICATION_PROBLEM_JSON_UTF8
.
application/problem+xml
.
APPLICATION_PROBLEM_XML
.
application/x-protobuf
.
APPLICATION_PROTOBUF
.
application/rss+xml
.
APPLICATION_RSS_XML
.
application/x-ndjson
.
APPLICATION_NDJSON
.
APPLICATION_STREAM_JSON_VALUE
.
application/stream+json
.
APPLICATION_NDJSON
as
a replacement or any other line-delimited JSON format (e.g. JSON Lines,
JSON Text Sequences).
APPLICATION_STREAM_JSON
.
APPLICATION_XHTML_XML
.
APPLICATION_XML
.
IMAGE_GIF
.
IMAGE_JPEG
.
IMAGE_PNG
.
MULTIPART_FORM_DATA
.
multipart/mixed
.
MULTIPART_MIXED
.
multipart/related
.
MULTIPART_RELATED
.
text/event-stream
.
TEXT_EVENT_STREAM
.
TEXT_HTML
.
text/markdown
.
TEXT_MARKDOWN
.
TEXT_PLAIN
.
TEXT_XML
.
sortByQualityValue(List)
.
sortBySpecificity(List)
.
MediaType
for the given primary type.
The subtype is set to "*", parameters empty.
type
- the primary type
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
for the given primary type and subtype.
The parameters are empty.
type
- the primary type
subtype
- the subtype
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
for the given type, subtype, and character set.
type
- the primary type
subtype
- the subtype
charset
- the character set
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
for the given type, subtype, and quality value.
type
- the primary type
subtype
- the subtype
qualityValue
- the quality value
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
, and allows to set the specified character set.
other
- the other media type
charset
- the character set
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
,
and allows for different parameters.
other
- the other media type
parameters
- the parameters, may be
null
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
for the given type, subtype, and parameters.
type
- the primary type
subtype
- the subtype
parameters
- the parameters, may be
null
IllegalArgumentException
- if any of the parameters contain illegal characters
MediaType
for the given
MimeType
.
The type, subtype and parameters information is copied and
MediaType
-specific
checks on parameters are performed.
mimeType
- the MIME type
IllegalArgumentException
- if any of the parameters contain illegal characters
q
parameter, if any.
Defaults to
1.0
.
MediaType
more specific than the given type.
true
.
false
.
false
.
true
.
false
.
true
.
false
.
isMoreSpecific
in class
MimeType
other
- the
MimeType
to be compared
isLessSpecific(MimeType)
MediaType
more specific than the given type.
false
.
true
.
true
.
false
.
true
.
false
.
false
.
isLessSpecific
in class
MimeType
other
- the
MimeType
to be compared
isMoreSpecific(MimeType)
MediaType
includes the given media type.
For instance,
text/*
includes
text/plain
and
text/html
,
and
application/*+xml
includes
application/soap+xml
, etc.
This method is
not
symmetric.
Simply calls
MimeType.includes(MimeType)
but declared with a
MediaType
parameter for binary backwards compatibility.
other
- the reference media type with which to compare
true
if this media type includes the given media type;
false
otherwise
MediaType
is compatible with the given media type.
For instance,
text/*
is compatible with
text/plain
,
text/html
, and vice versa. In effect, this method is similar to
includes(org.springframework.http.MediaType)
, except that it
is
symmetric.
Simply calls
MimeType.isCompatibleWith(MimeType)
but declared with a
MediaType
parameter for binary backwards compatibility.
other
- the reference media type with which to compare
true
if this media type is compatible with the given media type;
false
otherwise
MediaType
.
MediaType
object,
with this method name following the 'valueOf' naming convention
(as supported by
ConversionService
.
value
- the string to parse
InvalidMediaTypeException
- if the media type value cannot be parsed
parseMediaType(String)
MediaType
.
mediaType
- the string to parse
InvalidMediaTypeException
- if the media type value cannot be parsed
MediaType
objects.
This method can be used to parse an Accept or Content-Type header.
mediaTypes
- the string to parse
InvalidMediaTypeException
- if the media type value cannot be parsed
MediaType
objects.
This method can be used to parse an Accept or Content-Type header.
mediaTypes
- the string to parse
InvalidMediaTypeException
- if the media type value cannot be parsed
MediaType
objects.
This method can be used to for an
Accept
or
Content-Type
header.
mediaTypes
- the media types to create a string representation for
MimeTypeUtils.sortBySpecificity(List)
MediaType
objects by specificity.
Given two media types:
For example:
audio/basic < audio/* < */*
audio/* < audio/*;q=0.7; audio/*;q=0.3
audio/basic;level=1 < audio/basic
audio/basic == text/html
audio/basic == audio/wave
mediaTypes
- the list of media types to be sorted
MediaType
objects by quality value.
Given two media types:
mediaTypes
- the list of media types to be sorted
getQualityValue()
MimeTypeUtils.sortBySpecificity(List)
MediaType
objects by specificity as the
primary criteria and quality value the secondary.
APPLICATION_GRAPHQL_RESPONSE