Examples of writeCacheTo()


Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

                            endpointInfo.setAddress(oldAddress);
                        }
                        if (errorMsg != null) {
                            resp.sendError(500, errorMsg);
                        } else {
                            out.writeCacheTo(resp.getOutputStream());
                            resp.getOutputStream().flush();                    
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                        throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

        if (enabled) {
            OutputStream os = m.getContent(OutputStream.class);
            if (os != osOriginal && os instanceof CachedOutputStream) {
                CachedOutputStream cos = (CachedOutputStream)os;
                if (cos.size() != 0) {
                    cos.writeCacheTo(osOriginal);
                }
            }
        }
    }
   
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

                            endpointInfo.setAddress(oldAddress);
                        }
                        if (errorMsg != null) {
                            resp.sendError(500, errorMsg);
                        } else {
                            out.writeCacheTo(resp.getOutputStream());
                            resp.getOutputStream().flush();                    
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                        throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

        if (enabled) {
            OutputStream os = m.getContent(OutputStream.class);
            if (os != osOriginal && os instanceof CachedOutputStream) {
                CachedOutputStream cos = (CachedOutputStream)os;
                if (cos.size() != 0) {
                    cos.writeCacheTo(osOriginal);
                }
            }
        }
    }
   
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

                            endpointInfo.setAddress(oldAddress);
                        }
                        if (errorMsg != null) {
                            resp.sendError(500, errorMsg);
                        } else {
                            out.writeCacheTo(resp.getOutputStream());
                            resp.getOutputStream().flush();                    
                        }
                    } finally {
                        out.close();
                    }
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

    private String toString(InputStream is) throws IOException {
        StringBuilder out = new StringBuilder();
        CachedOutputStream os = new CachedOutputStream();
        IOHelper.copy(is, os);
        is.close();
        os.writeCacheTo(out);
        return out.toString();

    }

}
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

    private String toString(InputStream is) throws IOException {
        StringBuilder out = new StringBuilder();
        CachedOutputStream os = new CachedOutputStream();
        IOHelper.copy(is, os);
        is.close();
        os.writeCacheTo(out);
        return out.toString();

    }

}
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

        KeyStore keyStore = SecurityUtils.loadKeyStore(keyStorePath,keyStorePassword);
        KeyPair keyPair = SecurityUtils.getKeyPair(keyStore,keyAlias,keyPassword);
 
        CachedOutputStream os = (CachedOutputStream)message.getContent(OutputStream.class);
        StringBuilder sb = new StringBuilder();
        os.writeCacheTo(sb);
       
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        Document document = dbf.newDocumentBuilder().parse(new ByteArrayInputStream(sb.toString().getBytes()));
       
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

        KeyStore keyStore = SecurityUtils.loadKeyStore(keyStorePath,keyStorePassword);
        KeyPair keyPair = SecurityUtils.getKeyPair(keyStore,keyAlias,keyPassword);
 
        CachedOutputStream os = (CachedOutputStream)message.getContent(OutputStream.class);
        StringBuilder sb = new StringBuilder();
        os.writeCacheTo(sb);
       
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        Document document = dbf.newDocumentBuilder().parse(new ByteArrayInputStream(sb.toString().getBytes()));
       
View Full Code Here

Examples of org.apache.cxf.io.CachedOutputStream.writeCacheTo()

    {
      try
      {
        CachedOutputStream os = (CachedOutputStream)message.getContent(OutputStream.class);
        StringBuilder sb = new StringBuilder();
        os.writeCacheTo(sb);
       
        OutputStream originalOs = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
        Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(this.getClass().getResourceAsStream("/nl/clockwork/mule/ebms/xsl/EbMSNullTransformation.xml")));
        transformer.transform(new StreamSource(new StringReader(sb.toString())),new StreamResult(originalOs));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.