Uses of Class
org.apache.juneau.MediaType
Packages that use MediaType
Package
Description
CSV Marshalling Support
HTTP Header Beans
REST Server API
REST Client API
REST Server Mock API
-
Uses of MediaType in org.apache.juneau
Subclasses of MediaType in org.apache.juneauModifier and TypeClassDescriptionclass
Describes a single type used in content negotiation between an HTTP client and server, as described in Section 14.1 and 14.7 of RFC2616 (the HTTP/1.1 specification).Fields in org.apache.juneau declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaType
MediaType.CSV
Reusable predefined media typestatic final MediaType
MediaType.EMPTY
Represents an empty media type object.static final MediaType
MediaType.HTML
Reusable predefined media typestatic final MediaType
MediaType.JSON
Reusable predefined media typestatic final MediaType
MediaType.MSGPACK
Reusable predefined media typestatic final MediaType
MediaType.N3
Reusable predefined media typestatic final MediaType
MediaType.NTRIPLE
Reusable predefined media typestatic final MediaType
MediaType.PLAIN
Reusable predefined media typestatic final MediaType
MediaType.RDF
Reusable predefined media typestatic final MediaType
MediaType.RDFABBREV
Reusable predefined media typestatic final MediaType
MediaType.TURTLE
Reusable predefined media typestatic final MediaType
MediaType.UON
Reusable predefined media typestatic final MediaType
MediaType.URLENCODING
Reusable predefined media typestatic final MediaType
MediaType.XML
Reusable predefined media typestatic final MediaType
MediaType.XMLSOAP
Reusable predefined media typeMethods in org.apache.juneau that return MediaTypeModifier and TypeMethodDescriptionMediaType.forEachParameter
(Consumer<NameValuePair> action) Performs an action on the additional parameters on this media type.final MediaType
MediaType.forEachSubType
(Consumer<String> action) Performs an action on the subtypes broken down by fragments delimited by"'" .final MediaType
BeanContext.getDefaultMediaType()
Media type.final MediaType
BeanSession.getMediaType()
Media type.static MediaType
Returns the media type for the specified string.static MediaType
MediaType.of
(String value, NameValuePair... parameters) Same asof(String)
but allows you to specify the parameters.static MediaType[]
Same asof(String)
but allows you to construct an array ofMediaTypes from an array of strings.Methods in org.apache.juneau with parameters of type MediaTypeModifier and TypeMethodDescriptionfinal int
final int
Returns a match metric against the specified media type where a larger number represents a better match.Context configuration property: Media type.Context configuration property: Media type.The session media type.BeanSession.Builder.mediaTypeDefault
(MediaType value) Same asBeanSession.Builder.mediaType(MediaType)
but doesn't overwrite the value if it is already set.BeanTraverseSession.Builder.mediaTypeDefault
(MediaType value) Method parameters in org.apache.juneau with type arguments of type MediaTypeModifier and TypeMethodDescriptionint
Given a list of media types, returns the best match for thisAccept header.int
Given a list of media types, returns the best match for thisContent-Type header. -
Uses of MediaType in org.apache.juneau.bean.openapi3.ui
Methods in org.apache.juneau.bean.openapi3.ui that return MediaTypeModifier and TypeMethodDescriptionOpenApiUI.forMediaTypes()
This UI applies to HTML requests only. -
Uses of MediaType in org.apache.juneau.bean.swagger
Methods in org.apache.juneau.bean.swagger that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionOperation.getConsumes()
Bean property getter:consumes .Swagger.getConsumes()
Bean property getter:consumes .Operation.getProduces()
Bean property getter:produces .Swagger.getProduces()
Bean property getter:produces .Methods in org.apache.juneau.bean.swagger with parameters of type MediaTypeModifier and TypeMethodDescriptionOperation.addConsumes
(MediaType... value) Bean property fluent setter:consumes .Swagger.addConsumes
(MediaType... values) Bean property appender:consumes .Operation.addProduces
(MediaType... value) Bean property fluent setter:produces .Swagger.addProduces
(MediaType... values) Adds one or more values to theproduces property.Operation.setConsumes
(MediaType... value) Bean property setter:consumes .Swagger.setConsumes
(MediaType... value) Bean property fluent setter:consumes .Operation.setProduces
(MediaType... value) Bean property setter:produces .Swagger.setProduces
(MediaType... value) Bean property fluent setter:produces .Method parameters in org.apache.juneau.bean.swagger with type arguments of type MediaTypeModifier and TypeMethodDescriptionOperation.addConsumes
(Collection<MediaType> values) Bean property appender:consumes .Swagger.addConsumes
(Collection<MediaType> values) Bean property appender:consumes .Operation.addProduces
(Collection<MediaType> values) Bean property setter:produces .Swagger.addProduces
(Collection<MediaType> values) Bean property appender:produces .Operation.setConsumes
(Collection<MediaType> value) Bean property setter:consumes .Swagger.setConsumes
(Collection<MediaType> value) Bean property setter:consumes .Operation.setProduces
(Collection<MediaType> value) Bean property setter:produces .Swagger.setProduces
(Collection<MediaType> value) Bean property setter:produces . -
Uses of MediaType in org.apache.juneau.bean.swagger.ui
Methods in org.apache.juneau.bean.swagger.ui that return MediaTypeModifier and TypeMethodDescriptionSwaggerUI.forMediaTypes()
This UI applies to HTML requests only. -
Uses of MediaType in org.apache.juneau.csv
Methods in org.apache.juneau.csv with parameters of type MediaTypeModifier and TypeMethodDescriptionCsvParserSession.Builder.mediaTypeDefault
(MediaType value) CsvSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.html
Methods in org.apache.juneau.html with parameters of type MediaTypeModifier and TypeMethodDescriptionHtmlDocSerializerSession.Builder.mediaTypeDefault
(MediaType value) HtmlParserSession.Builder.mediaTypeDefault
(MediaType value) HtmlSchemaDocSerializerSession.Builder.mediaTypeDefault
(MediaType value) HtmlSchemaSerializerSession.Builder.mediaTypeDefault
(MediaType value) HtmlSerializerSession.Builder.mediaTypeDefault
(MediaType value) HtmlStrippedDocSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.http
Methods in org.apache.juneau.http with parameters of type MediaTypeModifier and TypeMethodDescriptionstatic final Accept
Creates a newAccept
header.static final ContentType
HttpHeaders.contentType
(MediaType value) Creates a newContentType
header.static final BasicMediaTypeHeader
HttpHeaders.mediaTypeHeader
(String name, MediaType value) Creates a newBasicMediaTypeHeader
header.Method parameters in org.apache.juneau.http with type arguments of type MediaTypeModifier and TypeMethodDescriptionstatic final ContentType
HttpHeaders.contentType
(Supplier<MediaType> value) Creates a newContentType
header with a delayed value.static final BasicMediaTypeHeader
HttpHeaders.mediaTypeHeader
(String name, Supplier<MediaType> value) Creates a newBasicMediaTypeHeader
header with a delayed value. -
Uses of MediaType in org.apache.juneau.http.header
Methods in org.apache.juneau.http.header that return MediaTypeModifier and TypeMethodDescriptionReturn the value if present, otherwise returnother .BasicMediaTypeHeader.toMediaType()
Returns the header value as aMediaType
.Methods in org.apache.juneau.http.header that return types with arguments of type MediaTypeMethods in org.apache.juneau.http.header with parameters of type MediaTypeModifier and TypeMethodDescriptionfinal int
Returns a match metric against the specified media type where a larger number represents a better match.static Accept
Static creator.static BasicMediaTypeHeader
Static creator.static ContentType
Static creator.Return the value if present, otherwise returnother .Method parameters in org.apache.juneau.http.header with type arguments of type MediaTypeModifier and TypeMethodDescriptionint
Given a list of media types, returns the best match for thisAccept header.int
Given a list of media types, returns the best match for thisContent-Type header.static ContentType
Static creator with delayed value.Constructors in org.apache.juneau.http.header with parameters of type MediaTypeModifierConstructorDescriptionBasicMediaTypeHeader
(String name, MediaType value) Constructor.ContentType
(MediaType value) Constructor.Constructor parameters in org.apache.juneau.http.header with type arguments of type MediaTypeModifierConstructorDescriptionBasicMediaTypeHeader
(String name, Supplier<MediaType> value) Constructor with delayed value.ContentType
(Supplier<MediaType> value) Constructor with delayed value. -
Uses of MediaType in org.apache.juneau.json
Methods in org.apache.juneau.json with parameters of type MediaTypeModifier and TypeMethodDescriptionJsonParserSession.Builder.mediaTypeDefault
(MediaType value) JsonSchemaSerializerSession.Builder.mediaTypeDefault
(MediaType value) JsonSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.jsonschema
Methods in org.apache.juneau.jsonschema with parameters of type MediaTypeModifier and TypeMethodDescriptionJsonSchemaGeneratorSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.msgpack
Methods in org.apache.juneau.msgpack with parameters of type MediaTypeModifier and TypeMethodDescriptionMsgPackParserSession.Builder.mediaTypeDefault
(MediaType value) MsgPackSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.oapi
Methods in org.apache.juneau.oapi with parameters of type MediaTypeModifier and TypeMethodDescriptionOpenApiParserSession.Builder.mediaTypeDefault
(MediaType value) OpenApiSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.parser
Methods in org.apache.juneau.parser that return MediaTypeModifier and TypeMethodDescriptionParserMatch.getMediaType()
Returns the media type of the parser that matched the HTTPContent-Type header value.final MediaType
Parser.getPrimaryMediaType()
Returns the first media type handled based on the values passed to theconsumes constructor parameter.Methods in org.apache.juneau.parser that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionParser.getMediaTypes()
Returns the media types handled based on the values passed to theconsumes constructor parameter.ParserSet.getSupportedMediaTypes()
Returns the media types that all parsers in this group can handleMethods in org.apache.juneau.parser with parameters of type MediaTypeModifier and TypeMethodDescriptionSame asParserSet.getParserMatch(MediaType)
but returns just the matched parser.ParserSet.getParserMatch
(MediaType mediaType) Same asParserSet.getParserMatch(String)
but matches using aMediaType
instance.InputStreamParserSession.Builder.mediaTypeDefault
(MediaType value) ParserSession.Builder.mediaTypeDefault
(MediaType value) ReaderParserSession.Builder.mediaTypeDefault
(MediaType value) Constructors in org.apache.juneau.parser with parameters of type MediaType -
Uses of MediaType in org.apache.juneau.plaintext
Methods in org.apache.juneau.plaintext with parameters of type MediaTypeModifier and TypeMethodDescriptionPlainTextParserSession.Builder.mediaTypeDefault
(MediaType value) PlainTextSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.rest
Methods in org.apache.juneau.rest that return MediaTypeModifier and TypeMethodDescriptionRestResponse.getMediaType()
Returns theContent-Type header stripped of the charset attribute if present.Methods in org.apache.juneau.rest that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionRestContext.Builder.consumes()
Returns the media types consumed by this resource if it's manually specified.RestContext.getConsumes()
Returns the explicit list of supported content types for this resource.RestContext.getProduces()
Returns the explicit list of supported accept types for this resource.RestOpContext.getSupportedAcceptTypes()
Returns a list of supported accept types.RestOpContext.getSupportedContentTypes()
Returns the list of supported content types.RestContext.Builder.produces()
Returns the media types produced by this resource if it's manually specified.Methods in org.apache.juneau.rest with parameters of type MediaTypeModifier and TypeMethodDescriptionSupported content media types.Supported content media types.Supported accept media types.Supported accept media types. -
Uses of MediaType in org.apache.juneau.rest.client
Methods in org.apache.juneau.rest.client with parameters of type MediaTypeModifier and TypeMethodDescriptionAppends theAccept andContent-Type headers on all requests made by this client. -
Uses of MediaType in org.apache.juneau.rest.httppart
Methods in org.apache.juneau.rest.httppart with parameters of type MediaTypeModifier and TypeMethodDescriptionSets the media type of this content. -
Uses of MediaType in org.apache.juneau.rest.mock
Methods in org.apache.juneau.rest.mock with parameters of type MediaTypeModifier and TypeMethodDescription -
Uses of MediaType in org.apache.juneau.serializer
Methods in org.apache.juneau.serializer that return MediaTypeModifier and TypeMethodDescriptionSerializerMatch.getMediaType()
Returns the media type of the serializers that matched the HTTPAccept header value.final MediaType
Serializer.getPrimaryMediaType()
Returns the first entry in theaccept parameter passed into the constructor.final MediaType
Serializer.getResponseContentType()
Optional method that returns the responseContent-Type for this serializer if it is different from the matched media type.Methods in org.apache.juneau.serializer that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionSerializerSet.getSupportedMediaTypes()
Returns the media types that all serializers in this group can handle.Methods in org.apache.juneau.serializer with parameters of type MediaTypeModifier and TypeMethodDescriptionSerializerSet.getSerializer
(MediaType mediaType) Same asSerializerSet.getSerializerMatch(MediaType)
but returns just the matched serializer.SerializerSet.getSerializerMatch
(MediaType mediaType) Same asSerializerSet.getSerializerMatch(String)
but matches using aMediaType
instance.SerializerSet.getStreamSerializer
(MediaType mediaType) Same asSerializerSet.getSerializer(MediaType)
, but casts it to aOutputStreamSerializer
.SerializerSet.getWriterSerializer
(MediaType mediaType) Same asSerializerSet.getSerializer(MediaType)
, but casts it to aWriterSerializer
.OutputStreamSerializerSession.Builder.mediaTypeDefault
(MediaType value) SerializerSession.Builder.mediaTypeDefault
(MediaType value) WriterSerializerSession.Builder.mediaTypeDefault
(MediaType value) Method parameters in org.apache.juneau.serializer with type arguments of type MediaTypeModifier and TypeMethodDescriptionfinal Serializer
Serializer.forEachAcceptMediaType
(Consumer<MediaType> action) Performs an action on the media types handled based on the value of theaccept parameter passed into the constructor.Constructors in org.apache.juneau.serializer with parameters of type MediaTypeModifierConstructorDescriptionSerializerMatch
(MediaType mediaType, Serializer serializer) Constructor. -
Uses of MediaType in org.apache.juneau.soap
Methods in org.apache.juneau.soap with parameters of type MediaTypeModifier and TypeMethodDescriptionSoapXmlSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.swap
Methods in org.apache.juneau.swap that return MediaTypeModifier and TypeMethodDescriptionObjectSwap.forMediaTypes()
Returns the media types that this swap is applicable to.Methods in org.apache.juneau.swap with parameters of type MediaTypeModifier and TypeMethodDescriptionObjectSwap<T,
?> ObjectSwap.forMediaTypes
(MediaType[] mediaTypes) Sets the media types that this swap is associated with. -
Uses of MediaType in org.apache.juneau.uon
Methods in org.apache.juneau.uon with parameters of type MediaTypeModifier and TypeMethodDescriptionUonParserSession.Builder.mediaTypeDefault
(MediaType value) UonSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.urlencoding
Methods in org.apache.juneau.urlencoding with parameters of type MediaTypeModifier and TypeMethodDescriptionUrlEncodingParserSession.Builder.mediaTypeDefault
(MediaType value) UrlEncodingSerializerSession.Builder.mediaTypeDefault
(MediaType value) -
Uses of MediaType in org.apache.juneau.xml
Methods in org.apache.juneau.xml with parameters of type MediaTypeModifier and TypeMethodDescriptionXmlDocSerializerSession.Builder.mediaTypeDefault
(MediaType value) XmlParserSession.Builder.mediaTypeDefault
(MediaType value) XmlSerializerSession.Builder.mediaTypeDefault
(MediaType value)