You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Norman Maurer (JIRA)" <se...@james.apache.org> on 2010/04/07 12:53:33 UTC

[jira] Resolved: (IMAP-127) Mailbox should allow to use an InputStream as message source when append to Mailbox

     [ https://issues.apache.org/jira/browse/IMAP-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved IMAP-127.
--------------------------------

    Resolution: Fixed

> Mailbox should allow to use an InputStream as message source when append to Mailbox
> -----------------------------------------------------------------------------------
>
>                 Key: IMAP-127
>                 URL: https://issues.apache.org/jira/browse/IMAP-127
>             Project: JAMES Imap
>          Issue Type: Improvement
>          Components: Mailbox
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 0.1
>
>
> At the moment the Mailbox interface offer the method :
>     long appendMessage(byte[] message, Date internalDate, MailboxSession mailboxSession, 
>             boolean isRecent, Flags flags) throws MailboxException;
> This is not really efficient because for using this you need to load the whole message content into memory. It would be better to use an InputStream. So it would look like:
>     long appendMessage(InputStream in, Date internalDate, MailboxSession mailboxSession, 
>             boolean isRecent, Flags flags) throws MailboxException;
> This would allow us to stream the message directly without have it in memory. If you really want to store a message which is hold in memory, you could use an ByteArrayInputStream for this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org