Class MediaTypeAdapter
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<String,MediaType>
-
- org.jboss.resteasy.plugins.providers.atom.MediaTypeAdapter
-
public class MediaTypeAdapter extends XmlAdapter<String,MediaType>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description MediaTypeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringmarshal(MediaType mediaType)Convert a bound type to a value type.MediaTypeunmarshal(String s)Convert a value type to a bound type.
-
-
-
Method Detail
-
unmarshal
public MediaType unmarshal(String s) throws Exception
Description copied from class:XmlAdapterConvert a value type to a bound type.- Specified by:
unmarshalin classXmlAdapter<String,MediaType>- Parameters:
s- The value to be converted. Can be null.- Throws:
Exception- if there's an error during the conversion. The caller is responsible for reporting the error to the user throughValidationEventHandler.
-
marshal
public String marshal(MediaType mediaType) throws Exception
Description copied from class:XmlAdapterConvert a bound type to a value type.- Specified by:
marshalin classXmlAdapter<String,MediaType>- Parameters:
mediaType- The value to be convereted. Can be null.- Throws:
Exception- if there's an error during the conversion. The caller is responsible for reporting the error to the user throughValidationEventHandler.
-
-