Class DocumentStreamAdapter

  • All Implemented Interfaces:
    MergeProcessor

    public class DocumentStreamAdapter
    extends Object
    implements MergeProcessor
    Adapter class to convert streams into documents.

    This is needed because the DocumentMerger understands DOM Documents, but items in War files are accessed as streams - therefore use this wrapper to pass streams into the DocumentMerger (or subclass).
    • Constructor Detail

      • DocumentStreamAdapter

        public DocumentStreamAdapter​(MergeProcessor next)
        constructor.
        Parameters:
        next - the processor to adapt
    • Method Detail

      • getDocument

        protected org.jdom2.Document getDocument​(InputStream theInput)
                                          throws IOException,
                                                 org.jdom2.JDOMException
        Parse the input stream into a document.
        Parameters:
        theInput - in the InputStream to read
        Returns:
        Document generated from the stream
        Throws:
        IOException - on IO exception
        org.jdom2.JDOMException - if there is an XML problem
      • getDescriptorIo

        public DescriptorIo getDescriptorIo()
        Returns:
        the descriptorIo
      • setDescriptorIo

        public void setDescriptorIo​(DescriptorIo descriptorIo)
        Parameters:
        descriptorIo - the descriptorIo to set