Class JsrMessageBodyWriter

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

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

      Fields 
      Modifier and Type Field Description
      private boolean close  
      private javax.json.JsonWriterFactory factory  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getSize​(javax.json.JsonStructure jsonStructure, java.lang.Class<?> aClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      boolean isWriteable​(java.lang.Class<?> aClass, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      void writeTo​(javax.json.JsonStructure jsonStructure, java.lang.Class<?> aClass, 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.Object> stringObjectMultivaluedMap, java.io.OutputStream outputStream)  
      • 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.JsonWriterFactory factory
      • close

        private final boolean close
    • Constructor Detail

      • JsrMessageBodyWriter

        public JsrMessageBodyWriter()
      • JsrMessageBodyWriter

        public JsrMessageBodyWriter​(javax.json.JsonWriterFactory factory,
                                    boolean closeStreams)
    • Method Detail

      • isWriteable

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

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

        public void writeTo​(javax.json.JsonStructure jsonStructure,
                            java.lang.Class<?> aClass,
                            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.Object> stringObjectMultivaluedMap,
                            java.io.OutputStream outputStream)
                     throws java.io.IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<javax.json.JsonStructure>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException