public class MediaTypeAdapter extends XmlAdapter<String,MediaType>
| Constructor and Description |
|---|
MediaTypeAdapter() |
| Modifier and Type | Method and Description |
|---|---|
String |
marshal(MediaType mediaType)
Convert a bound type to a value type.
|
MediaType |
unmarshal(String s)
Convert a value type to a bound type.
|
public MediaType unmarshal(String s) throws Exception
XmlAdapterunmarshal in class XmlAdapter<String,MediaType>s - The value to be converted. Can be null.Exception - if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler.public String marshal(MediaType mediaType) throws Exception
XmlAdaptermarshal in class XmlAdapter<String,MediaType>mediaType - The value to be convereted. Can be null.Exception - if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler.Copyright © 2018 JBoss by Red Hat. All rights reserved.