Search in sources :

Example 6 with CachedWriter

use of org.apache.cxf.io.CachedWriter in project cxf by apache.

the class WireTapIn method handleReader.

private void handleReader(Message message, Reader reader) throws IOException {
    CachedWriter writer = new CachedWriter();
    IOUtils.copyAndCloseInput(reader, writer);
    message.setContent(Reader.class, writer.getReader());
    message.setContent(CachedWriter.class, writer);
}
Also used : CachedWriter(org.apache.cxf.io.CachedWriter)

Aggregations

CachedWriter (org.apache.cxf.io.CachedWriter)6 XMLStreamWriter (javax.xml.stream.XMLStreamWriter)3 Test (org.junit.Test)2 Document (org.w3c.dom.Document)2 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 Writer (java.io.Writer)1 XMLStreamReader (javax.xml.stream.XMLStreamReader)1 Source (javax.xml.transform.Source)1 Transformer (javax.xml.transform.Transformer)1 TransformerException (javax.xml.transform.TransformerException)1 DOMSource (javax.xml.transform.dom.DOMSource)1 StreamResult (javax.xml.transform.stream.StreamResult)1 StreamSource (javax.xml.transform.stream.StreamSource)1 Fault (org.apache.cxf.interceptor.Fault)1 DelegatingXMLStreamWriter (org.apache.cxf.staxutils.DelegatingXMLStreamWriter)1 StaxSource (org.apache.cxf.staxutils.StaxSource)1