Class MessageBodyWriters.BaseMessageBodyWriter

    • Field Detail

      • resourceContext

        @Context
        protected jakarta.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,
                                   jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      • writeTo

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