Examples of writeCacheTo()


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

      {
        IOUtils.copy(is,bos);
        bos.flush();
        is.close();
        message.setContent(InputStream.class,bos.getInputStream());
        bos.writeCacheTo(buffer.getPayload(),limit);
        bos.close();
      }
      catch (IOException e)
      {
        throw new Fault(e);
View Full Code Here

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

        if (headers != null)
          buffer.getHeader().append(headers);

        CachedOutputStream cos = (CachedOutputStream)message.getContent(OutputStream.class);
        OutputStream originalOs = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
        cos.writeCacheTo(buffer.getPayload(),limit);
        cos.writeCacheTo(originalOs);
        message.setContent(OutputStream.class,originalOs);
       
        if (logger.isInfoEnabled())
          logger.info(buffer.toString());
View Full Code Here

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

          buffer.getHeader().append(headers);

        CachedOutputStream cos = (CachedOutputStream)message.getContent(OutputStream.class);
        OutputStream originalOs = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
        cos.writeCacheTo(buffer.getPayload(),limit);
        cos.writeCacheTo(originalOs);
        message.setContent(OutputStream.class,originalOs);
       
        if (logger.isInfoEnabled())
          logger.info(buffer.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()

        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()

        }
        OutputStream os = m.getContent(OutputStream.class);
        if (os != osOriginal && os instanceof CachedOutputStream) {
            CachedOutputStream cos = (CachedOutputStream)os;
            if (cos.size() != 0) {
                cos.writeCacheTo(osOriginal);
            }
        }
    }
   
    private void handleWriteException(Message message,
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.CachedWriter.writeCacheTo()

                buffer.getMessage().append("Filename: " + writer.getTempFile().getAbsolutePath() + "\n");
            }
            if (writer.size() > limit) {
                buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
            }
            writer.writeCacheTo(buffer.getPayload(), limit);
        } catch (Exception e) {
            throw new Fault(e);
        }
    }
    protected void logInputStream(Message message, InputStream is, LoggingMessage buffer,
View Full Code Here

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

                buffer.getMessage().append("Filename: " + writer.getTempFile().getAbsolutePath() + "\n");
            }
            if (writer.size() > limit) {
                buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
            }
            writer.writeCacheTo(buffer.getPayload(), limit);
        } catch (Exception e) {
            throw new Fault(e);
        }
    }
    protected void logInputStream(Message message, InputStream is, LoggingMessage buffer,
View Full Code Here

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

                buffer.getMessage().append("Filename: " + writer.getTempFile().getAbsolutePath() + "\n");
            }
            if (writer.size() > limit && limit != -1) {
                buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
            }
            writer.writeCacheTo(buffer.getPayload(), limit);
        } catch (Exception e) {
            throw new Fault(e);
        }
    }
    protected void logInputStream(Message message, InputStream is, LoggingMessage buffer,
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.