public class MediaTypeAdapter extends XmlAdapter<String,MediaType>
public MediaType unmarshal(String s) throws Exception
XmlAdapter
unmarshal
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
XmlAdapter
marshal
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 © 2014 JBoss by Red Hat. All Rights Reserved.