Class MediaTypeProvider
java.lang.Object
org.glassfish.jersey.message.internal.MediaTypeProvider
- All Implemented Interfaces:
RuntimeDelegate.HeaderDelegate<MediaType>
,HeaderDelegateProvider<MediaType>
@Singleton
public class MediaTypeProvider
extends Object
implements HeaderDelegateProvider<MediaType>
Header delegate provider for MediaType.
- Author:
- Marc Hadley, Marek Potociar, Martin Matula
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MediaTypeProvider
public MediaTypeProvider()
-
-
Method Details
-
supports
Description copied from interface:HeaderDelegateProvider
Ascertain if the Provider supports a particular type.- Specified by:
supports
in interfaceHeaderDelegateProvider<MediaType>
- Parameters:
type
- the type that is to be supported.- Returns:
- true if the type is supported, otherwise false.
-
toString
- Specified by:
toString
in interfaceRuntimeDelegate.HeaderDelegate<MediaType>
-
fromString
- Specified by:
fromString
in interfaceRuntimeDelegate.HeaderDelegate<MediaType>
-
valueOf
Create a newMediaType
instance from a header reader.- Parameters:
reader
- header reader.- Returns:
- new
MediaType
instance. - Throws:
ParseException
- in case of a header parsing error.
-