james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tellier Benoit (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Resolved] (MIME4J-268) Helper method for message to bytes convertion
Date Tue, 13 Mar 2018 09:58:00 GMT

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

Tellier Benoit resolved MIME4J-268.
-----------------------------------
    Resolution: Fixed

https://github.com/linagora/james-mime4j/pull/12 solved the issue

> Helper method for message to bytes convertion
> ---------------------------------------------
>
>                 Key: MIME4J-268
>                 URL: https://issues.apache.org/jira/browse/MIME4J-268
>             Project: James Mime4j
>          Issue Type: New Feature
>          Components: dom
>            Reporter: Tellier Benoit
>            Priority: Major
>
> Current code looks like this:
> {code:java}
>     public byte[] asBytes(Message message) throws IOException {
>         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>         DefaultMessageWriter writer = new DefaultMessageWriter();
>         writer.writeMessage(message, buffer);
>         return buffer.toByteArray();
>     }
> {code}
> This is rather complicated for clients. I would propose to introduce that helper method
in *DefaultMessageWriter*.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message