Package org.apache.james.mailbox.store.streaming

Examples of org.apache.james.mailbox.store.streaming.InputStreamContent


                Iterator<MessageResult> messageResultIterator = srcMessageManager.getMessages(MessageRange.all(), GROUP, srcMailboxSession);
               
                while (messageResultIterator.hasNext()) {

                    MessageResult messageResult = messageResultIterator.next();
                    InputStreamContent content = (InputStreamContent) messageResult.getFullContent();

                    dstMailboxManager.startProcessingRequest(dstMailboxSession);
                    dstMessageManager.appendMessage(content.getInputStream(), messageResult.getInternalDate(), dstMailboxSession, messageResult.getFlags().contains(Flag.RECENT), messageResult.getFlags());
                    dstMailboxManager.endProcessingRequest(dstMailboxSession);
                    log.info("Message #" + j + " appended in destination mailbox with path=" + mailboxPath.toString());
                    j++;

                }
View Full Code Here


     * @param membership
     * @return bodyContent
     * @throws IOException
     */
    public static Content createBodyContent(Message<?> membership) throws IOException {
        final InputStreamContent result = new InputStreamContent(membership, Type.Body);
        return result;
    }
View Full Code Here

     * @param membership
     * @return content
     * @throws IOException
     */
    public static Content createFullContent(final Message<?> membership) throws IOException {
        final InputStreamContent result = new InputStreamContent(membership, Type.Full);
        return result;
    }
View Full Code Here

    /**
     * @see org.apache.james.mailbox.model.MessageResult#getFullContent()
     */
    public final Content getFullContent() throws IOException {
        if (fullContent == null) {
            fullContent = new InputStreamContent(message, Type.Full);
        }
        return fullContent;
    }
View Full Code Here

    /**
     * @see org.apache.james.mailbox.model.MessageResult#getBody()
     */
    public final Content getBody() throws IOException {
        if (bodyContent == null) {
            bodyContent = new InputStreamContent(message, Type.Body);
        }
        return bodyContent;
    }
View Full Code Here

                Iterator<MessageResult> messageResultIterator = srcMessageManager.getMessages(MessageRange.all(), FetchGroupImpl.FULL_CONTENT, srcMailboxSession);
               
                while (messageResultIterator.hasNext()) {

                    MessageResult messageResult = messageResultIterator.next();
                    InputStreamContent content = (InputStreamContent) messageResult.getFullContent();

                    dstMailboxManager.startProcessingRequest(dstMailboxSession);
                    dstMessageManager.appendMessage(content.getInputStream(), messageResult.getInternalDate(), dstMailboxSession, messageResult.getFlags().contains(Flag.RECENT), messageResult.getFlags());
                    dstMailboxManager.endProcessingRequest(dstMailboxSession);
                    log.info("Message #" + j + " appended in destination mailbox with path=" + mailboxPath.toString());
                    j++;

                }
View Full Code Here

     * @param membership
     * @return bodyContent
     * @throws IOException
     */
    public static Content createBodyContent(Message<?> membership) throws IOException {
        final InputStreamContent result = new InputStreamContent(membership, Type.Body);
        return result;
    }
View Full Code Here

     * @param membership
     * @return content
     * @throws IOException
     */
    public static Content createFullContent(final Message<?> membership) throws IOException {
        final InputStreamContent result = new InputStreamContent(membership, Type.Full);
        return result;
    }
View Full Code Here

                Iterator<MessageResult> messageResultIterator = srcMessageManager.getMessages(MessageRange.all(), GROUP, srcMailboxSession);
               
                while (messageResultIterator.hasNext()) {

                    MessageResult messageResult = messageResultIterator.next();
                    InputStreamContent content = (InputStreamContent) messageResult.getFullContent();

                    dstMailboxManager.startProcessingRequest(dstMailboxSession);
                    dstMessageManager.appendMessage(content.getInputStream(), messageResult.getInternalDate(), dstMailboxSession, messageResult.getFlags().contains(Flag.RECENT), messageResult.getFlags());
                    dstMailboxManager.endProcessingRequest(dstMailboxSession);
                    log.info("Message #" + j + " appended in destination mailbox with path=" + mailboxPath.toString());
                    j++;

                }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.store.streaming.InputStreamContent

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.