## Uses of Class
javax.ws.rs.core.MediaType

Packages that use MediaType
com.sun.jersey.api | Provides support for responses and exceptions.
com.sun.jersey.api.client | Provides support for client-side communication with HTTP-based RESTful Web services.
com.sun.jersey.api.container.filter | Provides common server-side filters.
com.sun.jersey.api.core | Provides support for configuration.
com.sun.jersey.api.model | Provides an abstract model of a resource class.
com.sun.jersey.core.header | Provides support for HTTP headers.
com.sun.jersey.core.header.reader | Provides support for reading HTTP headers.
com.sun.jersey.core.provider | Provides support for provider-related classes.
com.sun.jersey.core.provider.jaxb | Provides support for JAXB-related message body readers and writers.
com.sun.jersey.core.spi.factory | Provides support for factories of particular component types.
com.sun.jersey.core.util | Provides support for collection-based classes.
com.sun.jersey.server.wadl | Provides support for WADL configuration and generation.
com.sun.jersey.server.wadl.generators | Provides support for JAXB WADL generation.
com.sun.jersey.server.wadl.generators.resourcedoc | Provides support for JAXB WADL generation for resource classes.
com.sun.jersey.spi | Provides support for service providers.
com.sun.jersey.spi.container | Provides support for containers and the web application that manages resource classes.
javax.ws.rs.core | Low-level interfaces and annotations used to create RESTful service resources.
javax.ws.rs.ext | APIs that provide extensions to the types supported by the JAX-RS API.

Uses of MediaType in com.sun.jersey.api

Methods in com.sun.jersey.api with parameters of type MediaType

`static

`<E> JResponse.JResponseBuilder<E>`

`

`JResponse.ok(E entity, MediaType type)`
Create a new `JResponse.JResponseBuilder` that contains a representation.

`B` | `JResponse.AJResponseBuilder.type(MediaType type)` Set the response media type.

Uses of MediaType in com.sun.jersey.api.client

Methods in com.sun.jersey.api.client that return MediaType
`MediaType` | `RequestWriter.RequestEntityWriter.getMediaType()`
`MediaType` | `ClientResponse.getType()` Get the media type of the response.

Methods in com.sun.jersey.api.client with parameters of type MediaType
`AsyncWebResource.Builder` | `AsyncWebResource.accept(MediaType... types)`
`AsyncViewResource.Builder` | `AsyncViewResource.accept(MediaType... types)`
`T` | `PartialRequestBuilder.accept(MediaType... types)`
`T` | `RequestBuilder.accept(MediaType... types)` Add acceptable media types.
`WebResource.Builder` | `WebResource.accept(MediaType... types)`
`ViewResource.Builder` | `ViewResource.accept(MediaType... types)`
`AsyncWebResource.Builder` | `AsyncWebResource.entity(java.lang.Object entity, MediaType type)`
`AsyncViewResource.Builder` | `AsyncViewResource.entity(java.lang.Object entity, MediaType type)`
`T` | `PartialRequestBuilder.entity(java.lang.Object entity, MediaType type)`
`T` | `RequestBuilder.entity(java.lang.Object entity, MediaType type)` Set the request entity with its media type.
`WebResource.Builder` | `WebResource.entity(java.lang.Object entity, MediaType type)`
`ViewResource.Builder` | `ViewResource.entity(java.lang.Object entity, MediaType type)`
`AsyncWebResource.Builder` | `AsyncWebResource.type(MediaType type)`
`AsyncViewResource.Builder` | `AsyncViewResource.type(MediaType type)`
`T` | `PartialRequestBuilder.type(MediaType type)`
`T` | `RequestBuilder.type(MediaType type)` Set the media type.
`WebResource.Builder` | `WebResource.type(MediaType type)`
`ViewResource.Builder` | `ViewResource.type(MediaType type)`

Uses of MediaType in com.sun.jersey.api.container.filter

Constructor parameters in com.sun.jersey.api.container.filter with type arguments of type MediaType
`UriConnegFilter(java.util.Map<java.lang.String,MediaType> mediaExtentions)` Create a filter with suffix to media type mappings.
`UriConnegFilter(java.util.Map<java.lang.String,MediaType> mediaExtentions, java.util.Map<java.lang.String,java.lang.String> languageExtentions)` Create a filter with suffix to media type mappings and suffix to langauge mappings.

Uses of MediaType in com.sun.jersey.api.core

Methods in com.sun.jersey.api.core that return MediaType
`MediaType` | `HttpRequestContext.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)` Deprecated. will stay in Jersey 1.x, use `Request.selectVariant(java.util.List)` as an alternative.
`MediaType` | `HttpResponseContext.getMediaType()` Get the media type of the response entity.

Methods in com.sun.jersey.api.core that return types with arguments of type MediaType
`java.util.List<MediaType>` | `HttpRequestContext.getAcceptableMediaTypes(java.util.List<QualitySourceMediaType> priorityMediaTypes)` Deprecated. will stay in Jersey 1.x, use `Request.selectVariant(java.util.List)` as an alternative.
`java.util.Map<java.lang.String,MediaType>` | `DefaultResourceConfig.getMediaTypeMappings()`
`java.util.Map<java.lang.String,MediaType>` | `ResourceConfig.getMediaTypeMappings()` Get a map of file extension to media type.

Method parameters in com.sun.jersey.api.core with type arguments of type MediaType
`MediaType` | `HttpRequestContext.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)` Deprecated. will stay in Jersey 1.x, use `Request.selectVariant(java.util.List)` as an alternative.

Uses of MediaType in com.sun.jersey.api.model

Methods in com.sun.jersey.api.model that return types with arguments of type MediaType
`java.util.List<MediaType>` | `AbstractResourceMethod.getSupportedInputTypes()`
`java.util.List<MediaType>` | `AbstractResourceMethod.getSupportedOutputTypes()`

Uses of MediaType in com.sun.jersey.core.header

Subclasses of MediaType in com.sun.jersey.core.header
`class` | `AcceptableMediaType` An acceptable media type.
`class` | `QualitySourceMediaType` An quality source media type.

Fields in com.sun.jersey.core.header declared as MediaType
`static MediaType` | `MediaTypes.FAST_INFOSET`
`static MediaType` | `MediaTypes.GENERAL_MEDIA_TYPE` The general media type corresponding to \*\/*.
`protected MediaType` | `LinkHeader.LinkHeaderBuilder.type`
`static MediaType` | `MediaTypes.WADL`
`static MediaType` | `MediaTypes.WADL_JSON`

Fields in com.sun.jersey.core.header with type parameters of type MediaType
`static java.util.List<MediaType>` | `MediaTypes.GENERAL_MEDIA_TYPE_LIST` A singleton list containing the general media type.
`static java.util.List<MediaType>` | `MediaTypes.GENERAL_QUALITY_SOURCE_MEDIA_TYPE_LIST` A singleton list containing the general media type.
`static java.util.Comparator<MediaType>` | `MediaTypes.MEDIA_TYPE_COMPARATOR` Comparator for media types.
`static java.util.Comparator<java.util.List<? extends MediaType>>` | `MediaTypes.MEDIA_TYPE_LIST_COMPARATOR` Comparator for lists of media types.

Methods in com.sun.jersey.core.header that return MediaType
`MediaType` | `LinkHeader.getType()`
`static MediaType` | `MediaTypes.getTypeWildCart(MediaType mediaType)` Returns MediaType with wildcard in subtype.
`static MediaType` | `MediaTypes.mostSpecific(MediaType m1, MediaType m2)` Get the most specific media type from a pair of media types.

Methods in com.sun.jersey.core.header that return types with arguments of type MediaType
`static java.util.List<MediaType>` | `MediaTypes.createMediaTypes(Consumes mime)` Create a list of media type from the `Consumes` annotation.
`static java.util.List<MediaType>` | `MediaTypes.createMediaTypes(Produces mime)` Create a list of media type from the Produces annotation.
`static java.util.List<MediaType>` | `MediaTypes.createMediaTypes(java.lang.String[] mediaTypes)` Create a list of media type from an array of media types.
`static java.util.List<MediaType>` | `MediaTypes.createQualitySourceMediaTypes(Produces mime)` Create a list of quality source media type from the Produces annotation.

Methods in com.sun.jersey.core.header with parameters of type MediaType
`static int` | `QualitySourceMediaType.getQualitySource(MediaType mt)`
`static MediaType` | `MediaTypes.getTypeWildCart(MediaType mediaType)` Returns MediaType with wildcard in subtype.
`static MediaType` | `MediaTypes.mostSpecific(MediaType m1, MediaType m2)` Get the most specific media type from a pair of media types.
`T` | `LinkHeader.LinkHeaderBuilder.type(MediaType type)`
`static boolean` | `MediaTypes.typeEquals(MediaType m1, MediaType m2)`

Method parameters in com.sun.jersey.core.header with type arguments of type MediaType
`static boolean` | `MediaTypes.intersects(java.util.List<? extends MediaType> ml1, java.util.List<? extends MediaType> ml2)`
`static boolean` | `MediaTypes.intersects(java.util.List<? extends MediaType> ml1, java.util.List<? extends MediaType> ml2)`

Constructors in com.sun.jersey.core.header with parameters of type MediaType
`QualitySourceMediaType(MediaType mt)`

Uses of MediaType in com.sun.jersey.core.header.reader

Methods in com.sun.jersey.core.header.reader that return types with arguments of type MediaType
`static java.util.List<MediaType>` | `HttpHeaderReader.readMediaTypes(java.util.List<MediaType> l, java.lang.String header)`

Method parameters in com.sun.jersey.core.header.reader with type arguments of type MediaType
`static java.util.List<MediaType>` | `HttpHeaderReader.readMediaTypes(java.util.List<MediaType> l, java.lang.String header)`

Uses of MediaType in com.sun.jersey.core.provider

Methods in com.sun.jersey.core.provider with parameters of type MediaType
`static java.nio.charset.Charset` | `AbstractMessageReaderWriterProvider.getCharset(MediaType m)` Get the character set from a media type.
`long` | `AbstractMessageReaderWriterProvider.getSize(T t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`static java.lang.String` | `AbstractMessageReaderWriterProvider.readFromAsString(java.io.InputStream in, MediaType type)` Read the bytes of an input stream and convert to a string.
`static void` | `AbstractMessageReaderWriterProvider.writeToAsString(java.lang.String s, java.io.OutputStream out, MediaType type)` Convert a string to bytes and write those bytes to an output stream.

Uses of MediaType in com.sun.jersey.core.provider.jaxb

Methods in com.sun.jersey.core.provider.jaxb with parameters of type MediaType
`protected javax.xml.bind.Marshaller` | `AbstractJAXBProvider.getMarshaller(java.lang.Class type, MediaType mt)`
`protected javax.xml.bind.Unmarshaller` | `AbstractJAXBProvider.getUnmarshaller(java.lang.Class type, MediaType mt)`
`protected abstract javax.xml.stream.XMLStreamReader` | `AbstractListElementProvider.getXMLStreamReader(java.lang.Class<?> elementType, MediaType mediaType, javax.xml.bind.Unmarshaller unmarshaller, java.io.InputStream entityStream)` Get the XMLStreamReader for unmarshalling.
`boolean` | `AbstractJAXBElementProvider.isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`boolean` | `AbstractListElementProvider.isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`boolean` | `AbstractRootElementProvider.isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`protected boolean` | `AbstractJAXBProvider.isSupported(MediaType m)`
`boolean` | `AbstractJAXBElementProvider.isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`boolean` | `AbstractListElementProvider.isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`boolean` | `AbstractRootElementProvider.isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
`protected abstract javax.xml.bind.JAXBElement<?>` | `AbstractJAXBElementProvider.readFrom(java.lang.Class<?> type, MediaType mediaType, javax.xml.bind.Unmarshaller u, java.io.InputStream entityStream)`
`javax.xml.bind.JAXBElement<?>` | `AbstractJAXBElementProvider.readFrom(java.lang.Class<javax.xml.bind.JAXBElement<?>> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)`
`protected java.lang.Object` | `AbstractRootElementProvider.readFrom(java.lang.Class<java.lang.Object> type, MediaType mediaType, javax.xml.bind.Unmarshaller u, java.io.InputStream entityStream)` Unmarshal a JAXB type.
`java.lang.Object` | `AbstractListElementProvider.readFrom(java.lang.Class<java.lang.Object> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)`
`java.lang.Object` | `AbstractRootElementProvider.readFrom(java.lang.Class<java.lang.Object> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)`
`abstract void` | `AbstractListElementProvider.writeList(java.lang.Class<?> elementType, java.util.Collection<?> t, MediaType mediaType, java.nio.charset.Charset c, javax.xml.bind.Marshaller m, java.io.OutputStream entityStream)` Write a collection of JAXB objects as child elements of the root element.
`void` | `AbstractJAXBElementProvider.writeTo(javax.xml.bind.JAXBElement<?> t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)`
`protected abstract void` | `AbstractJAXBElementProvider.writeTo(javax.xml.bind.JAXBElement<?> t, MediaType mediaType, java.nio.charset.Charset c, javax.xml.bind.Marshaller m, java.io.OutputStream entityStream)`
`void` | `AbstractListElementProvider.writeTo(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)`
`void` | `AbstractRootElementProvider.writeTo(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)`
`protected void` | `AbstractRootElementProvider.writeTo(java.lang.Object t, MediaType mediaType, java.nio.charset.Charset c, javax.xml.bind.Marshaller m, java.io.OutputStream entityStream)` Marshal an instance of a JAXB type.

Constructors in com.sun.jersey.core.provider.jaxb with parameters of type MediaType
`AbstractJAXBElementProvider(Providers ps, MediaType mt)`
`AbstractJAXBProvider(Providers ps, MediaType mt)`
`AbstractListElementProvider(Providers ps, MediaType mt)`
`AbstractRootElementProvider(Providers ps, MediaType mt)`

Uses of MediaType in com.sun.jersey.core.spi.factory

Methods in com.sun.jersey.core.spi.factory that return MediaType

`

`<T> MediaType`

`

`MessageBodyFactory.getMessageBodyWriterMediaType(java.lang.Class<T> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] as, java.util.List<MediaType> acceptableMediaTypes)`

Methods in com.sun.jersey.core.spi.factory that return types with arguments of type MediaType

`

`<T> java.util.List<MediaType>`

`

`MessageBodyFactory.getMessageBodyWriterMediaTypes(java.lang.Class<T> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] as)`

`java.util.Map<MediaType,java.util.List<MessageBodyReader>>` | `MessageBodyFactory.getReaders(MediaType mediaType)`
`java.util.Map<MediaType,java.util.List<MessageBodyWriter>>` | `MessageBodyFactory.getWriters(MediaType mediaType)`

Methods in com.sun.jersey.core.spi.factory with parameters of type MediaType

`

`<T> MessageBodyReader<T>`

`

`MessageBodyFactory.getMessageBodyReader(java.lang.Class<T> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] as, MediaType mediaType)`

`

`<T> MessageBodyWriter<T>`

`

`MessageBodyFactory.getMessageBodyWriter(java.lang.Class<T> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] as, MediaType mediaType)`

`java.util.Map<MediaType,java.util.List<MessageBodyReader>>` | `MessageBodyFactory.getReaders(MediaType mediaType)`
`java.util.Map<MediaType,java.util.List<MessageBodyWriter>>` | `MessageBodyFactory.getWriters(MediaType mediaType)`
`Variant.VariantListBuilder` | `VariantListBuilderImpl.mediaTypes(MediaType... mediaTypes)`

`

`<T> ContextResolver<T>`

`

`ContextResolverFactory.resolve(java.lang.reflect.Type t, MediaType m)`

`Response.ResponseBuilder` | `ResponseBuilderImpl.type(MediaType type)`

Method parameters in com.sun.jersey.core.spi.factory with type arguments of type MediaType

`

`<T> MediaType`

`

`MessageBodyFactory.getMessageBodyWriterMediaType(java.lang.Class<T> c, java.lang.reflect.Type t, java.lang.annotation.Annotation[] as, java.util.List<MediaType> acceptableMediaTypes)`

`java.lang.String` | `MessageBodyFactory.readersToString(java.util.Map<MediaType,java.util.List<MessageBodyReader>> readers)`
`java.lang.String` | `MessageBodyFactory.writersToString(java.util.Map<MediaType,java.util.List<MessageBodyWriter>> writers)`

Uses of MediaType in com.sun.jersey.core.util

Methods in com.sun.jersey.core.util with parameters of type MediaType
`static java.nio.charset.Charset` | `ReaderWriter.getCharset(MediaType m)` Get the character set from a media type.
`static java.lang.String` | `ReaderWriter.readFromAsString(java.io.InputStream in, MediaType type)` Read the bytes of an input stream and convert to a string.
`static void` | `ReaderWriter.writeToAsString(java.lang.String s, java.io.OutputStream out, MediaType type)` Convert a string to bytes and write those bytes to an output stream.

Uses of MediaType in com.sun.jersey.server.wadl

Methods in com.sun.jersey.server.wadl that return MediaType
`MediaType` | `ApplicationDescription.ExternalGrammar.getType()`

Methods in com.sun.jersey.server.wadl with parameters of type MediaType
`com.sun.research.ws.wadl.Representation` | `WadlGenerator.createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)`
`com.sun.research.ws.wadl.Representation` | `WadlGeneratorImpl.createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)`
`com.sun.research.ws.wadl.Representation` | `WadlGeneratorImpl.createResponseRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)`

`

`<T> T`

`

`WadlGenerator.Resolver.resolve(java.lang.Class wadlType, MediaType mt, java.lang.Class<T> resolvedType)`

`

`<T> T`

`

`WadlGenerator.ExternalGrammarDefinition.resolve(java.lang.Class type, MediaType mt, java.lang.Class<T> resolvedType)`

`

`<T> T`

`

`ApplicationDescription.resolve(java.lang.Class type, MediaType mt, java.lang.Class<T> resolvedType)`

Constructors in com.sun.jersey.server.wadl with parameters of type MediaType
`ApplicationDescription.ExternalGrammar(MediaType type, byte[] content, boolean includedInGrammar)`

Uses of MediaType in com.sun.jersey.server.wadl.generators

Methods in com.sun.jersey.server.wadl.generators that return MediaType
`MediaType` | `AbstractWadlGeneratorGrammarGenerator.HasType.getMediaType()`

Methods in com.sun.jersey.server.wadl.generators with parameters of type MediaType
`abstract boolean` | `AbstractWadlGeneratorGrammarGenerator.acceptMediaType(MediaType type)`
`boolean` | `WadlGeneratorJAXBGrammarGenerator.acceptMediaType(MediaType type)`
`com.sun.research.ws.wadl.Representation` | `AbstractWadlGeneratorGrammarGenerator.createRequestRepresentation(AbstractResource ar, AbstractResourceMethod arm, MediaType mt)`
`com.sun.research.ws.wadl.Representation` | `WadlGeneratorGrammarsSupport.createRequestRepresentation(AbstractResource ar, AbstractResourceMethod arm, MediaType mt)`
`com.sun.research.ws.wadl.Representation` | `WadlGeneratorApplicationDoc.createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)`
`protected static AbstractWadlGeneratorGrammarGenerator.HasType` | `AbstractWadlGeneratorGrammarGenerator.parameter(Parameter param, MediaType mt)`

Uses of MediaType in com.sun.jersey.server.wadl.generators.resourcedoc

Methods in com.sun.jersey.server.wadl.generators.resourcedoc with parameters of type MediaType
`com.sun.research.ws.wadl.Representation` | `WadlGeneratorResourceDocSupport.createRequestRepresentation(AbstractResource r, AbstractResourceMethod m, MediaType mediaType)`

Uses of MediaType in com.sun.jersey.spi

Methods in com.sun.jersey.spi that return MediaType

`

`<T> MediaType`

`

`MessageBodyWorkers.getMessageBodyWriterMediaType(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, java.util.List<MediaType> acceptableMediaTypes)`
Get the most acceptable media type supported for a Java type given a set of acceptable media types.

Methods in com.sun.jersey.spi that return types with arguments of type MediaType

`

`<T> java.util.List<MediaType>`

`

`MessageBodyWorkers.getMessageBodyWriterMediaTypes(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)`
Get the list of media types supported for a Java type.

`java.util.Map<MediaType,java.util.List<MessageBodyReader>>` | `MessageBodyWorkers.getReaders(MediaType mediaType)` Get the map of media type to list of message body writers that are compatible with a media type.
`java.util.Map<MediaType,java.util.List<MessageBodyWriter>>` | `MessageBodyWorkers.getWriters(MediaType mediaType)` Get the map of media type to list of message body writers that are compatible with a media type.

Methods in com.sun.jersey.spi with parameters of type MediaType

`

`<T> MessageBodyReader<T>`

`

`MessageBodyWorkers.getMessageBodyReader(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
Get a message body reader that matches a set of criteria.

`

`<T> MessageBodyWriter<T>`

`

`MessageBodyWorkers.getMessageBodyWriter(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
Get a message body writer that matches a set of criteria.

`java.util.Map<MediaType,java.util.List<MessageBodyReader>>` | `MessageBodyWorkers.getReaders(MediaType mediaType)` Get the map of media type to list of message body writers that are compatible with a media type.
`java.util.Map<MediaType,java.util.List<MessageBodyWriter>>` | `MessageBodyWorkers.getWriters(MediaType mediaType)` Get the map of media type to list of message body writers that are compatible with a media type.

Method parameters in com.sun.jersey.spi with type arguments of type MediaType

`

`<T> MediaType`

`

`MessageBodyWorkers.getMessageBodyWriterMediaType(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, java.util.List<MediaType> acceptableMediaTypes)`
Get the most acceptable media type supported for a Java type given a set of acceptable media types.

`java.lang.String` | `MessageBodyWorkers.readersToString(java.util.Map<MediaType,java.util.List<MessageBodyReader>> readers)` Convert a map media type to list of message body readers to a string.
`java.lang.String` | `MessageBodyWorkers.writersToString(java.util.Map<MediaType,java.util.List<MessageBodyWriter>> writers)` Convert a map media type to list of message body writers to a string.

Uses of MediaType in com.sun.jersey.spi.container

Methods in com.sun.jersey.spi.container that return MediaType
`MediaType` | `AdaptingContainerRequest.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)`
`MediaType` | `ContainerRequest.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)`
`MediaType` | `AdaptingContainerRequest.getMediaType()`
`MediaType` | `ContainerRequest.getMediaType()`
`MediaType` | `ContainerResponse.getMediaType()`
`MediaType` | `AdaptingContainerResponse.getMediaType()`

Methods in com.sun.jersey.spi.container that return types with arguments of type MediaType
`java.util.List<MediaType>` | `AdaptingContainerRequest.getAcceptableMediaTypes()`
`java.util.List<MediaType>` | `ContainerRequest.getAcceptableMediaTypes()`
`java.util.List<MediaType>` | `AdaptingContainerRequest.getAcceptableMediaTypes(java.util.List<QualitySourceMediaType> priorityMediaTypes)`
`java.util.List<MediaType>` | `ContainerRequest.getAcceptableMediaTypes(java.util.List<QualitySourceMediaType> priorityMediaTypes)`

Methods in com.sun.jersey.spi.container with parameters of type MediaType

`

`<T> void`

`

`ContainerRequest.setEntity(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, T entity)`
Set the request entity.

Method parameters in com.sun.jersey.spi.container with type arguments of type MediaType
`MediaType` | `AdaptingContainerRequest.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)`
`MediaType` | `ContainerRequest.getAcceptableMediaType(java.util.List<MediaType> mediaTypes)`

Uses of MediaType in javax.ws.rs.core

Fields in javax.ws.rs.core declared as MediaType
`static MediaType` | `MediaType.APPLICATION_ATOM_XML_TYPE` "application/atom+xml"
`static MediaType` | `MediaType.APPLICATION_FORM_URLENCODED_TYPE` "application/x-www-form-urlencoded"
`static MediaType` | `MediaType.APPLICATION_JSON_TYPE` "application/json"
`static MediaType` | `MediaType.APPLICATION_OCTET_STREAM_TYPE` "application/octet-stream"
`static MediaType` | `MediaType.APPLICATION_SVG_XML_TYPE` "application/svg+xml"
`static MediaType` | `MediaType.APPLICATION_XHTML_XML_TYPE` "application/xhtml+xml"
`static MediaType` | `MediaType.APPLICATION_XML_TYPE` "application/xml"
`static MediaType` | `MediaType.MULTIPART_FORM_DATA_TYPE` "multipart/form-data"
`static MediaType` | `MediaType.TEXT_HTML_TYPE` "text/html"
`static MediaType` | `MediaType.TEXT_PLAIN_TYPE` "text/plain"
`static MediaType` | `MediaType.TEXT_XML_TYPE` "text/xml"
`static MediaType` | `MediaType.WILDCARD_TYPE` "*/*"

Methods in javax.ws.rs.core that return MediaType
`MediaType` | `HttpHeaders.getMediaType()` Get the media type of the request entity
`MediaType` | `Variant.getMediaType()` Get the media type of the variant
`static MediaType` | `MediaType.valueOf(java.lang.String type)` Creates a new instance of MediaType by parsing the supplied string.

Methods in javax.ws.rs.core that return types with arguments of type MediaType
`java.util.List<MediaType>` | `HttpHeaders.getAcceptableMediaTypes()` Get a list of media types that are acceptable for the response.

Methods in javax.ws.rs.core with parameters of type MediaType
`boolean` | `MediaType.isCompatible(MediaType other)` Check if this media type is compatible with another media type.
`static Variant.VariantListBuilder` | `Variant.mediaTypes(MediaType... mediaTypes)` Create a `Variant.VariantListBuilder` initialized with a set of supported media types.
`abstract Variant.VariantListBuilder` | `Variant.VariantListBuilder.mediaTypes(MediaType... mediaTypes)` Set the media type[s] for this variant.
`static Response.ResponseBuilder` | `Response.ok(java.lang.Object entity, MediaType type)` Create a new ResponseBuilder that contains a representation.
`abstract Response.ResponseBuilder` | `Response.ResponseBuilder.type(MediaType type)` Set the response media type on the ResponseBuilder.

Constructors in javax.ws.rs.core with parameters of type MediaType
`Variant(MediaType mediaType, java.util.Locale language, java.lang.String encoding)` Create a new instance of Variant

Uses of MediaType in javax.ws.rs.ext

Methods in javax.ws.rs.ext with parameters of type MediaType

`

`<T> ContextResolver<T>`

`

`Providers.getContextResolver(java.lang.Class<T> contextType, MediaType mediaType)`
Get a context resolver for a particular type of context and media type.

`

`<T> MessageBodyReader<T>`

`

`Providers.getMessageBodyReader(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
Get a message body reader that matches a set of criteria.

`

`<T> MessageBodyWriter<T>`

`

`Providers.getMessageBodyWriter(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)`
Get a message body writer that matches a set of criteria.

`long` | `MessageBodyWriter.getSize(T t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)` Called before `writeTo` to ascertain the length in bytes of the serialized form of `t`.
`boolean` | `MessageBodyReader.isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)` Ascertain if the MessageBodyReader can produce an instance of a particular type.
`boolean` | `MessageBodyWriter.isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType)` Ascertain if the MessageBodyWriter supports a particular type.
`T` | `MessageBodyReader.readFrom(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)` Read a type from the `InputStream`.
`void` | `MessageBodyWriter.writeTo(T t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, MediaType mediaType, MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)` Write a type to an HTTP response.

Copyright © 2017 Oracle Corporation. All Rights Reserved.