Package org.apache.axiom.attachments.utils

Examples of org.apache.axiom.attachments.utils.BAAInputStream


                if (count < thresholdSize) {
                    return new PartContentOnMemory(baaos.buffers(), baaos.length());
                } else {
                    // A BAAInputStream is an input stream over a list of non-contiguous 4K buffers.
                    BAAInputStream baais =
                        new BAAInputStream(baaos.buffers(), baaos.length());

                    return new PartContentOnFile(manager,
                                          baais,
                                          in,
                                          attachmentDir);
View Full Code Here


            log.debug("Enter ParserInputStreamDataSource.copy()");
        }
        try {
            BAAOutputStream baaos = new BAAOutputStream();
            BufferUtils.inputStream2OutputStream(data.readParserInputStream(), baaos);
            BAAInputStream baais = new BAAInputStream(baaos.buffers(),
                        baaos.length());
           
            if (log.isDebugEnabled()) {
                log.debug("Exit ParserInputStreamDataSource.copy()");
            }
View Full Code Here

        this.data =  data;
        this.length = length;
    }

    InputStream getInputStream() {
        return new BAAInputStream(data, length);
    }
View Full Code Here

        // Use a default implementation
        return null;
    }

    void writeTo(OutputStream os) throws IOException {
        new BAAInputStream(data, length).writeTo(os);
    }
View Full Code Here

                            log.debug("The inputStream does not supports mark().  Copying Stream");
                        }
                        // make a non-contiguous resettable input stream
                        BAAOutputStream baaos = new BAAOutputStream();
                        BufferUtils.inputStream2OutputStream(inputStream, baaos);
                        BAAInputStream baais = new BAAInputStream(baaos.buffers(),
                                    baaos.length());
                        payload = baais;
                        payload.mark(Integer.MAX_VALUE);
                    } catch (Throwable t) {
                        if(log.isDebugEnabled()){
View Full Code Here

                }
            } finally {
                in = null; // GC the incoming stream
            }
           
            localStream = new BAAInputStream(baaos.buffers(), baaos.length());
            if (log.isDebugEnabled()) {
                log.debug("The local stream built from the detached " +
                                "stream has a length of:" + baaos.length());
            }
            count = count + baaos.length();
View Full Code Here

               
                if (total < threshholdSize) {
                    return new PartOnMemoryEnhanced(headers, baaos.buffers(), baaos.length());
                } else {
                    // A BAAInputStream is an input stream over a list of non-contiguous 4K buffers.
                    BAAInputStream baais =
                        new BAAInputStream(baaos.buffers(), baaos.length());
                   
                    return new PartOnFile(manager, headers,
                                          baais,
                                          in,
                                          attachmentDir);
View Full Code Here

        // There is no file name
        return null;
    }

    public InputStream getInputStream() throws IOException, MessagingException {
        return new BAAInputStream(data, length);
    }
View Full Code Here

        /* (non-Javadoc)
         * @see javax.activation.DataSource#getInputStream()
         */
        public InputStream getInputStream() throws IOException {
            InputStream is  = new BAAInputStream(data, length);
            String cte = null;
            try {
                cte = getContentTransferEncoding();
                if(cte != null){
                    if(log.isDebugEnabled()){
View Full Code Here

        // There is no file name
        return null;
    }

    public InputStream getInputStream() throws IOException, MessagingException {
        return new BAAInputStream(data, length);
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.attachments.utils.BAAInputStream

Copyright © 2018 www.massapicom. 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.