Uses of Class
io.jooby.MediaType
-
Uses of MediaType in io.jooby
Modifier and TypeFieldDescriptionstatic final MediaType
MediaType.all
ALL.static final MediaType
MediaType.css
TEXT_CSS.static final MediaType
MediaType.form
FORM_URLENCODED.static final MediaType
MediaType.html
TEXT_HTML.static final MediaType
MediaType.js
APPLICATION_JSON.static final MediaType
MediaType.json
APPLICATION_JSON.static final MediaType
MediaType.multipart
MULTIPART_FORM_DATA.static final MediaType
MediaType.octetStream
APPLICATION_OCTET_STREAM.static final MediaType
MediaType.text
TEXT_PLAIN.static final MediaType
MediaType.xml
APPLICATION_XML.static final MediaType
MediaType.yaml
YAML.Modifier and TypeFieldDescriptionstatic final BinaryOperator<MediaType>
MediaType.MOST_SPECIFIC
Computes and returns the most specific media type of both.Modifier and TypeMethodDescriptionCheck if the accept type list matches the given produces list and return the most specific media type from produces list.default MediaType
static MediaType
Mediatype by file extension.static MediaType
Mediatype by file extension.static MediaType
Mediatype by file extension.static MediaType
MediaType.byFileExtension
(String ext) Mediatype by file extension.FileDownload.getContentType()
File content type.Context.getRequestType()
RequestContent-Type
header ornull
when missing.Context.getRequestType
(MediaType defaults) RequestContent-Type
header ornull
when missing.default MediaType
DefaultContext.getRequestType()
default MediaType
DefaultContext.getRequestType
(MediaType defaults) ForwardingContext.getRequestType()
ForwardingContext.getRequestType
(MediaType defaults) Context.getResponseType()
Get response content type.ForwardingContext.getResponseType()
static MediaType
Parse a string value into a media-type.Modifier and TypeMethodDescriptionRoute.getConsumes()
Request types (format) consumed by this route.Route.getProduces()
Response types (format) produces by this route.Parse one or more mediatype values.Modifier and TypeMethodDescriptionboolean
True if the given type matches the `Accept` header.default boolean
boolean
int
Add one or more request types (format) consumed by this route.Add one or more request types (format) consumed by this route.<T> T
Convert the HTTP body to the given type.default <T> T
<T> T
Get a decoder for the given content type or get anStatusCode.UNSUPPORTED_MEDIA_TYPE
.default MessageDecoder
Jooby.decoder
(MediaType contentType, MessageDecoder decoder) MessageDecoder for given media type.Router.decoder
(MediaType contentType, MessageDecoder decoder) Register a decoder for the given content type.Jooby.encoder
(MediaType contentType, MessageEncoder encoder) Router.encoder
(MediaType contentType, MessageEncoder encoder) Register a route response encoder.Context.getRequestType
(MediaType defaults) RequestContent-Type
header ornull
when missing.default MediaType
DefaultContext.getRequestType
(MediaType defaults) ForwardingContext.getRequestType
(MediaType defaults) boolean
True if this mediatype is compatible with the given content type.Add one or more response types (format) produces by this route.Add one or more response types (format) produces by this route.Context.responseStream
(MediaType contentType) HTTP response channel as output stream.Context.responseStream
(MediaType contentType, SneakyThrows.Consumer<OutputStream> consumer) HTTP response channel as output stream.default OutputStream
DefaultContext.responseStream
(MediaType contentType) default Context
DefaultContext.responseStream
(MediaType contentType, SneakyThrows.Consumer<OutputStream> consumer) ForwardingContext.responseStream
(MediaType contentType) ForwardingContext.responseStream
(MediaType contentType, SneakyThrows.Consumer<OutputStream> consumer) Context.responseWriter
(MediaType contentType) HTTP response channel as response writer.Context.responseWriter
(MediaType contentType, SneakyThrows.Consumer<PrintWriter> consumer) HTTP response channel as response writer.Context.responseWriter
(MediaType contentType, Charset charset) HTTP response channel as response writer.Context.responseWriter
(MediaType contentType, Charset charset, SneakyThrows.Consumer<PrintWriter> consumer) HTTP response channel as response writer.default PrintWriter
DefaultContext.responseWriter
(MediaType contentType) default Context
DefaultContext.responseWriter
(MediaType contentType, SneakyThrows.Consumer<PrintWriter> consumer) default Context
DefaultContext.responseWriter
(MediaType contentType, Charset charset, SneakyThrows.Consumer<PrintWriter> consumer) ForwardingContext.responseWriter
(MediaType contentType) ForwardingContext.responseWriter
(MediaType contentType, SneakyThrows.Consumer<PrintWriter> consumer) ForwardingContext.responseWriter
(MediaType contentType, Charset charset) ForwardingContext.responseWriter
(MediaType contentType, Charset charset, SneakyThrows.Consumer<PrintWriter> consumer) Context.setDefaultResponseType
(MediaType contentType) Set the default response content type header.ForwardingContext.setDefaultResponseType
(MediaType contentType) Context.setResponseType
(MediaType contentType) Set response content type header.Context.setResponseType
(MediaType contentType, Charset charset) Set response content type header.default Context
DefaultContext.setResponseType
(MediaType contentType) ForwardingContext.setResponseType
(MediaType contentType) ForwardingContext.setResponseType
(MediaType contentType, Charset charset) Modifier and TypeMethodDescriptionCheck if the accept type list matches the given produces list and return the most specific media type from produces list.default MediaType
Route.setConsumes
(Collection<MediaType> consumes) Add one or more request types (format) consumed by this route.RouteSet.setConsumes
(Collection<MediaType> consumes) Add one or more request types (format) consumed by this route.Route.setProduces
(Collection<MediaType> produces) Add one or more response types (format) produces by this route.RouteSet.setProduces
(Collection<MediaType> produces) Add one or more response types (format) produces by this route. -
Uses of MediaType in io.jooby.handler