@Singleton public class MediaTypeProvider extends Object implements HeaderDelegateProvider<jakarta.ws.rs.core.MediaType>
| Constructor and Description |
|---|
MediaTypeProvider() |
| Modifier and Type | Method and Description |
|---|---|
jakarta.ws.rs.core.MediaType |
fromString(String header) |
boolean |
supports(Class<?> type)
Ascertain if the Provider supports a particular type.
|
String |
toString(jakarta.ws.rs.core.MediaType header) |
static jakarta.ws.rs.core.MediaType |
valueOf(HttpHeaderReader reader)
Create a new
MediaType instance from a header reader. |
public boolean supports(Class<?> type)
HeaderDelegateProvidersupports in interface HeaderDelegateProvider<jakarta.ws.rs.core.MediaType>type - the type that is to be supported.public String toString(jakarta.ws.rs.core.MediaType header)
toString in interface jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate<jakarta.ws.rs.core.MediaType>public jakarta.ws.rs.core.MediaType fromString(String header)
fromString in interface jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate<jakarta.ws.rs.core.MediaType>public static jakarta.ws.rs.core.MediaType valueOf(HttpHeaderReader reader) throws ParseException
MediaType instance from a header reader.reader - header reader.MediaType instance.ParseException - in case of a header parsing error.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.