Search in sources :

Example 46 with XMLSecEvent

use of org.apache.xml.security.stax.ext.stax.XMLSecEvent in project santuario-java by apache.

the class AbstractBufferingOutputProcessor method flushBufferAndCallbackAfterHeader.

protected void flushBufferAndCallbackAfterHeader(OutputProcessorChain outputProcessorChain, Deque<XMLSecEvent> xmlSecEventDeque) throws XMLStreamException, XMLSecurityException {
    this.processHeaderEvent(outputProcessorChain);
    // loop through the rest of the document
    while (!xmlSecEventDeque.isEmpty()) {
        XMLSecEvent xmlSecEvent = xmlSecEventDeque.pop();
        outputProcessorChain.reset();
        outputProcessorChain.processEvent(xmlSecEvent);
    }
    outputProcessorChain.reset();
}
Also used : XMLSecEvent(org.apache.xml.security.stax.ext.stax.XMLSecEvent)

Aggregations

XMLSecEvent (org.apache.xml.security.stax.ext.stax.XMLSecEvent)46 ByteArrayOutputStream (java.io.ByteArrayOutputStream)25 Test (org.junit.Test)25 XMLEventReader (javax.xml.stream.XMLEventReader)22 XMLSecurityConstants (org.apache.xml.security.stax.ext.XMLSecurityConstants)16 InputStream (java.io.InputStream)15 OutputStream (java.io.OutputStream)14 Map (java.util.Map)14 QName (javax.xml.namespace.QName)14 Transformer (org.apache.xml.security.stax.ext.Transformer)14 IOException (java.io.IOException)10 XMLSecurityException (org.apache.xml.security.exceptions.XMLSecurityException)9 XMLStreamException (javax.xml.stream.XMLStreamException)6 Canonicalizer20010315_OmitCommentsTransformer (org.apache.xml.security.stax.impl.transformer.canonicalizer.Canonicalizer20010315_OmitCommentsTransformer)6 ArrayList (java.util.ArrayList)5 TransformBase64Decode (org.apache.xml.security.stax.impl.transformer.TransformBase64Decode)5 TransformIdentity (org.apache.xml.security.stax.impl.transformer.TransformIdentity)5 XMLStreamReader (javax.xml.stream.XMLStreamReader)4 Canonicalizer20010315_WithCommentsTransformer (org.apache.xml.security.stax.impl.transformer.canonicalizer.Canonicalizer20010315_WithCommentsTransformer)4 UnixInputStream (org.apache.xml.security.test.stax.utils.UnixInputStream)4