Class XmlViewMessageBodyReader

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<View>

    @Provider
    @Consumes({"application/xml","text/xml"})
    public class XmlViewMessageBodyReader
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<View>
    A MessageBodyReader for XML.
    Author:
    Carl Harris
    • Constructor Detail

      • XmlViewMessageBodyReader

        public XmlViewMessageBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> aClass,
                                  Type type,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<View>
      • readFrom

        public View readFrom​(Class<View> aClass,
                             Type type,
                             Annotation[] annotations,
                             javax.ws.rs.core.MediaType mediaType,
                             javax.ws.rs.core.MultivaluedMap<String,​String> multivaluedMap,
                             InputStream inputStream)
                      throws IOException,
                             javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<View>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException