james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Resolved] (MIME4J-191) API doesn't expose anymore a method to write out header fields
Date Sun, 17 Apr 2011 10:44:05 GMT

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

Oleg Kalnichevski resolved MIME4J-191.
--------------------------------------

    Resolution: Fixed

Added MimeWriter#writeField method

Oleg

> API doesn't expose anymore a method to write out header fields
> --------------------------------------------------------------
>
>                 Key: MIME4J-191
>                 URL: https://issues.apache.org/jira/browse/MIME4J-191
>             Project: JAMES Mime4j
>          Issue Type: Bug
>          Components: dom
>    Affects Versions: 0.7
>            Reporter: Stefano Bagnara
>             Fix For: 0.7
>
>
> jDKIM used this code to convert a List<Field> (mime4j) into a List of folded headers
Strings:
> ----
>     private List<String> convertFields(List<Field> res) {
>         List<String> res2 = new LinkedList<String>();
>         for (Field f : res) {
>             ByteArrayOutputStream bos = new ByteArrayOutputStream();
>             String field = null;
>             try {
>             	f.writeTo(bos);
>                 field = new String(bos.toByteArray());
>             } catch (IOException e) {
>             }
>             res2.add(field);
>         }
>         return res2;
>     }
> -----
> I checked out MimeWriter but it doesn't expose any "Field" related writer. What API replaces
the Field.writeTo  method?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message