Uses of Class
javax.ws.rs.core.MediaType
-
Packages that use MediaType Package Description 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 javax.ws.rs.core
Fields in javax.ws.rs.core declared as MediaType Modifier and Type Field Description static MediaTypeMediaType. APPLICATION_ATOM_XML_TYPE"application/atom+xml"static MediaTypeMediaType. APPLICATION_FORM_URLENCODED_TYPE"application/x-www-form-urlencoded"static MediaTypeMediaType. APPLICATION_JSON_TYPE"application/json"static MediaTypeMediaType. APPLICATION_OCTET_STREAM_TYPE"application/octet-stream"static MediaTypeMediaType. APPLICATION_SVG_XML_TYPE"application/svg+xml"static MediaTypeMediaType. APPLICATION_XHTML_XML_TYPE"application/xhtml+xml"static MediaTypeMediaType. APPLICATION_XML_TYPE"application/xml"static MediaTypeMediaType. MULTIPART_FORM_DATA_TYPE"multipart/form-data"static MediaTypeMediaType. TEXT_HTML_TYPE"text/html"static MediaTypeMediaType. TEXT_PLAIN_TYPE"text/plain"static MediaTypeMediaType. TEXT_XML_TYPE"text/xml"static MediaTypeMediaType. WILDCARD_TYPE"*/*"Methods in javax.ws.rs.core that return MediaType Modifier and Type Method Description MediaTypeHttpHeaders. getMediaType()Get the media type of the request entityMediaTypeVariant. getMediaType()Get the media type of the variantstatic MediaTypeMediaType. valueOf(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 Modifier and Type Method Description 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 Modifier and Type Method Description booleanMediaType. 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.ResponseBuilderResponse. ok(Object entity, MediaType type)Create a new ResponseBuilder that contains a representation.abstract Response.ResponseBuilderResponse.ResponseBuilder. type(MediaType type)Set the response media type on the ResponseBuilder.Constructors in javax.ws.rs.core with parameters of type MediaType Constructor Description Variant(MediaType mediaType, Locale language, 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 Modifier and Type Method Description <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)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.TMessageBodyReader. readFrom(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream)Read a type from theInputStream.voidMessageBodyWriter. writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)Write a type to an HTTP response.
-