Class MessageBodyWriters.BaseMessageBodyWriter

    • Field Detail

      • resourceContext

        @Context
        protected javax.ws.rs.container.ResourceContext resourceContext
    • Constructor Detail

      • BaseMessageBodyWriter

        public BaseMessageBodyWriter()
    • Method Detail

      • getSupportedMediaType

        public abstract String getSupportedMediaType()
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>
      • writeTo

        public void writeTo​(Object toWrite,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException