Uses of Class
javax.ws.rs.core.MediaType
Packages that use MediaType
Package
Description
The JAX-RS client API
Container-specific JAX-RS API.
Low-level interfaces and annotations used to create RESTful service
resources.
APIs that provide extensions to the types supported by the JAX-RS API.
-
Uses of MediaType in javax.ws.rs.client
Methods in javax.ws.rs.client that return MediaTypeModifier and TypeMethodDescriptionClientRequestContext.getMediaType()Get the media type of the entity.ClientResponseContext.getMediaType()Get the media type of the entity.Entity.getMediaType()Get entity media type.Methods in javax.ws.rs.client that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionClientRequestContext.getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in javax.ws.rs.client with parameters of type MediaTypeModifier and TypeMethodDescriptionAdd the accepted response media types.static <T> Entity<T> Create an entity using a supplied content media type.static <T> Entity<T> Entity.entity(T entity, MediaType mediaType, Annotation[] annotations) Create an entity using a supplied content media type.Start building a request to the targeted web resource and define the accepted response media types.voidClientRequestContext.setEntity(Object entity, Annotation[] annotations, MediaType mediaType) Set a new message entity, including the attached annotations and the media type.Constructors in javax.ws.rs.client with parameters of type MediaType -
Uses of MediaType in javax.ws.rs.container
Methods in javax.ws.rs.container that return MediaTypeModifier and TypeMethodDescriptionContainerRequestContext.getMediaType()Get the media type of the entity.ContainerResponseContext.getMediaType()Get the media type of the entity.Methods in javax.ws.rs.container that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionContainerRequestContext.getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in javax.ws.rs.container with parameters of type MediaTypeModifier and TypeMethodDescriptionvoidContainerResponseContext.setEntity(Object entity, Annotation[] annotations, MediaType mediaType) Set a new message entity, including the attached annotations and the media type. -
Uses of MediaType in javax.ws.rs.core
Fields in javax.ws.rs.core declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeMediaType.APPLICATION_ATOM_XML_TYPEAMediaTypeconstant representing ""application/atom+xml"" media type.static final MediaTypeMediaType.APPLICATION_FORM_URLENCODED_TYPEAMediaTypeconstant representing ""application/x-www-form-urlencoded"" media type.static final MediaTypeMediaType.APPLICATION_JSON_TYPEAMediaTypeconstant representing ""application/json"" media type.static final MediaTypeMediaType.APPLICATION_OCTET_STREAM_TYPEAMediaTypeconstant representing ""application/octet-stream"" media type.static final MediaTypeMediaType.APPLICATION_SVG_XML_TYPEAMediaTypeconstant representing ""application/svg+xml"" media type.static final MediaTypeMediaType.APPLICATION_XHTML_XML_TYPEAMediaTypeconstant representing ""application/xhtml+xml"" media type.static final MediaTypeMediaType.APPLICATION_XML_TYPEAMediaTypeconstant representing ""application/xml"" media type.private MediaTypeVariant.mediaTypestatic final MediaTypeMediaType.MULTIPART_FORM_DATA_TYPEAMediaTypeconstant representing ""multipart/form-data"" media type.static final MediaTypeMediaType.TEXT_HTML_TYPEAMediaTypeconstant representing ""text/html"" media type.static final MediaTypeMediaType.TEXT_PLAIN_TYPEAMediaTypeconstant representing ""text/plain"" media type.static final MediaTypeMediaType.TEXT_XML_TYPEAMediaTypeconstant representing ""text/xml"" media type.static final MediaTypeMediaType.WILDCARD_TYPEMethods in javax.ws.rs.core that return MediaTypeModifier and TypeMethodDescriptionHttpHeaders.getMediaType()Get the media type of the request entity.abstract MediaTypeResponse.getMediaType()Get the media type of the message entity.Variant.getMediaType()Get the media type of the variant.static MediaTypeCreates a new instance ofMediaTypeby parsing the supplied string.MediaType.withCharset(String charset) Create a newMediaTypeinstance with the same type, subtype and parameters copied from the original instance and the supplied ""charset"" parameter.Methods in javax.ws.rs.core that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionHttpHeaders.getAcceptableMediaTypes()Get a list of media types that are acceptable for the response.Methods in javax.ws.rs.core with parameters of type MediaTypeModifier and TypeMethodDescriptionbooleanMediaType.isCompatible(MediaType other) Check if this media type is compatible with another media type.static Variant.VariantListBuilderVariant.mediaTypes(MediaType... mediaTypes) Create aVariant.VariantListBuilderinitialized with a set of supported media types.abstract Variant.VariantListBuilderVariant.VariantListBuilder.mediaTypes(MediaType... mediaTypes) Set the media type(s) for this variant.static Response.ResponseBuilderCreate a new ResponseBuilder that contains a representation.abstract Response.ResponseBuilderSet the message entity media type.Constructors in javax.ws.rs.core with parameters of type MediaType -
Uses of MediaType in javax.ws.rs.ext
Methods in javax.ws.rs.ext that return MediaTypeModifier and TypeMethodDescriptionInterceptorContext.getMediaType()Get media type of HTTP entity.Methods in javax.ws.rs.ext with parameters of type MediaTypeModifier and TypeMethodDescription<T> ContextResolver<T> Providers.getContextResolver(Class<T> contextType, MediaType mediaType) Get a context resolver for a particular type of context and media type.<T> MessageBodyReader<T> Providers.getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) Get a message body reader that matches a set of criteria.<T> MessageBodyWriter<T> Providers.getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) Get a message body writer that matches a set of criteria.longMessageBodyWriter.getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) Originally, the method has been called beforewriteToto ascertain the length in bytes of the serialized form oft.booleanMessageBodyReader.isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) Ascertain if the MessageBodyReader can produce an instance of a particular type.booleanMessageBodyWriter.isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) Ascertain if the MessageBodyWriter supports a particular type.MessageBodyReader.readFrom(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) Read a type from theInputStream.voidInterceptorContext.setMediaType(MediaType mediaType) Update media type of HTTP entity.voidMessageBodyWriter.writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Write a type to an HTTP message.