Skip navigation links

Package org.columba.ristretto.composer

This is the package for rendering messages.

See: Description

Package org.columba.ristretto.composer Description

This is the package for rendering messages. To create a message with ristretto you have to build a MimePart hierarchy, with headers and bodies. After that take the root MimePart and give it as parameter to the MimeTreeRenderer render methods. As a result you get an InputStream from wich you can read the fully RFC compatible rendered message.

The underlying structure

To render the single mimeparts there exist the MimePartRenderer. Built in we have a DefaultRenderer which simply adds the header and the specified body to the message. Maybe a quoted-printable or base64 encoding is done if specified in the MimeHeader. Next there is a TextPartRenderer wich works like the DefaultMimePartRenderer except that it does CharsetConversion if specified in the MimeHeader. Last there is a MultipartRenderer which renderes all childparts to one multipart like defined in RFC 2046.

This framework can easily be enhanced by adding your own mimepartrenderer. An example where this can be done is e.g. to add GnuPG support like defined in RFC 3501. To add your own renderer call MimeTreeRenderer addMimePartRenderer once and your Renderer will be used for the mimetype you specified whenever such a mimepart is encounterd while rendering your message.

Skip navigation links

Copyright © 2021. All Rights Reserved.