Examples of MemoryBlob


Examples of org.apache.axiom.util.blob.MemoryBlob

        if (dhr != null && dhr.isBinary()) {
            DataHandler dh = dhr.getDataHandler();
            reader.next();
            return dh;
        } else {
            WritableBlob blob = new MemoryBlob();
            Writer out = new Base64DecodingOutputStreamWriter(blob.getOutputStream());
            try {
                writeTextTo(reader, out);
                // Take into account that in non coalescing mode, there may be additional
                // CHARACTERS events
                loop: while (true) {
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

    }
   
    @Test
    public void testPlain() throws Exception {
        DataHandler dh = new DataHandler(new RandomDataSource(10000));
        MemoryBlob blob = new MemoryBlob();
        OutputStream out = blob.getOutputStream();
        createTestDocument(dh).serialize(out);
        out.close();
        test(dh, new StAXOMBuilder(blob.getInputStream()), false, false, true);
    }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

    }
   
    @Test
    public void testWithXOP() throws Exception {
        DataHandler dh = new DataHandler(new RandomDataSource(10000));
        MemoryBlob blob = new MemoryBlob();
        OutputStream out = blob.getOutputStream();
        OMOutputFormat format = new OMOutputFormat();
        format.setDoOptimize(true);
        createTestDocument(dh).serialize(out, format);
        out.close();
        Attachments attachments = new Attachments(blob.getInputStream(), format.getContentType());
        test(dh, new XOPAwareStAXOMBuilder(attachments.getRootPartInputStream(), attachments), false, true, true);
    }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

        public PartOutputStream(String contentType, String contentTransferEncoding,
                String contentID) {
            this.contentType = contentType;
            this.contentTransferEncoding = contentTransferEncoding;
            this.contentID = contentID;
            blob = new MemoryBlob();
            parent = blob.getOutputStream();
        }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

        if (dhr != null && dhr.isBinary()) {
            DataHandler dh = dhr.getDataHandler();
            reader.next();
            return dh;
        } else {
            WritableBlob blob = new MemoryBlob();
            Writer out = new Base64DecodingOutputStreamWriter(blob.getOutputStream());
            try {
                writeTextTo(reader, out);
                // Take into account that in non coalescing mode, there may be additional
                // CHARACTERS events
                loop: while (true) {
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

                String contentID, List/*<Header>*/ extraHeaders) {
            this.contentType = contentType;
            this.contentTransferEncoding = contentTransferEncoding;
            this.contentID = contentID;
            this.extraHeaders = extraHeaders;
            blob = new MemoryBlob();
            parent = blob.getOutputStream();
        }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

    }
   
    @Test
    public void testPlain() throws Exception {
        DataHandler dh = new DataHandler(new RandomDataSource(10000));
        MemoryBlob blob = new MemoryBlob();
        OutputStream out = blob.getOutputStream();
        createTestDocument(dh).serialize(out);
        out.close();
        test(dh, new StAXOMBuilder(blob.getInputStream()), false, false, true);
    }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

    }
   
    @Test
    public void testWithXOP() throws Exception {
        DataHandler dh = new DataHandler(new RandomDataSource(10000));
        MemoryBlob blob = new MemoryBlob();
        OutputStream out = blob.getOutputStream();
        OMOutputFormat format = new OMOutputFormat();
        format.setDoOptimize(true);
        createTestDocument(dh).serialize(out, format);
        out.close();
        Attachments attachments = new Attachments(blob.getInputStream(), format.getContentType());
        test(dh, new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(), attachments), false, true, true);
    }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

        public PartOutputStream(String contentType, String contentTransferEncoding,
                String contentID) {
            this.contentType = contentType;
            this.contentTransferEncoding = contentTransferEncoding;
            this.contentID = contentID;
            blob = new MemoryBlob();
            parent = blob.getOutputStream();
        }
View Full Code Here

Examples of org.apache.axiom.util.blob.MemoryBlob

        if (dhr != null && dhr.isBinary()) {
            DataHandler dh = dhr.getDataHandler();
            reader.next();
            return dh;
        } else {
            WritableBlob blob = new MemoryBlob();
            Writer out = new Base64DecodingOutputStreamWriter(blob.getOutputStream());
            try {
                writeTextTo(reader, out);
                // Take into account that in non coalescing mode, there may be additional
                // CHARACTERS events
                loop: while (true) {
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.