Class XmlCollectionJaxbProvider

    • Method Detail

      • writeCollection

        public final void writeCollection​(Class<?> elementType,
                                          Collection<?> t,
                                          jakarta.ws.rs.core.MediaType mediaType,
                                          Charset c,
                                          jakarta.xml.bind.Marshaller m,
                                          OutputStream entityStream)
                                   throws jakarta.xml.bind.JAXBException,
                                          IOException
        Description copied from class: AbstractCollectionJaxbProvider
        Write a collection of JAXB objects as child elements of the root element.
        Specified by:
        writeCollection in class AbstractCollectionJaxbProvider
        Parameters:
        elementType - the element type in the collection.
        t - the collection to marshall
        mediaType - the media type
        c - the charset
        m - the marshaller
        entityStream - the output stream to marshall the collection
        Throws:
        jakarta.xml.bind.JAXBException - in case the marshalling of element collection fails.
        IOException - in case of any other I/O error while marshalling the collection of JAXB objects.