Class JsrMessageBodyReader

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

    @Consumes({"application/json","*/json","*/*+json","*/x-json","*/javascript","*/x-javascript"})
    public class JsrMessageBodyReader
    extends java.lang.Object
    implements javax.ws.rs.ext.MessageBodyReader<javax.json.JsonStructure>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean closeStream  
      private javax.json.JsonReaderFactory factory  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable​(java.lang.Class<?> aClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      javax.json.JsonStructure readFrom​(java.lang.Class<javax.json.JsonStructure> jsonStructureClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> stringStringMultivaluedMap, java.io.InputStream inputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • factory

        private final javax.json.JsonReaderFactory factory
      • closeStream

        private final boolean closeStream
    • Constructor Detail

      • JsrMessageBodyReader

        public JsrMessageBodyReader()
      • JsrMessageBodyReader

        public JsrMessageBodyReader​(javax.json.JsonReaderFactory factory,
                                    boolean closeStream)
    • Method Detail

      • isReadable

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

        public javax.json.JsonStructure readFrom​(java.lang.Class<javax.json.JsonStructure> jsonStructureClass,
                                                 java.lang.reflect.Type type,
                                                 java.lang.annotation.Annotation[] annotations,
                                                 javax.ws.rs.core.MediaType mediaType,
                                                 javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> stringStringMultivaluedMap,
                                                 java.io.InputStream inputStream)
                                          throws java.io.IOException,
                                                 javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<javax.json.JsonStructure>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException