tourguide
Class MimeContent

java.lang.Object
  extended byjavax.mail.Multipart
      extended byjavax.mail.internet.MimeMultipart
          extended bytourguide.MimeContent

public class MimeContent
extends javax.mail.internet.MimeMultipart

Helps compose a MIME document.


Constructor Summary
MimeContent()
           
 
Method Summary
 void addImage(java.awt.image.BufferedImage img)
          Adds an jpeg image to the document.
 void addTextList(java.util.List tl)
          Adds a list of text strings to the document.
 void addTextMedia(java.lang.String aTextPart)
          Adds a text part to the document.
 byte[] byteArrayContent()
          Provides the MIME document content.
 
Methods inherited from class javax.mail.internet.MimeMultipart
getBodyPart, getBodyPart, getCount, setSubType, writeTo
 
Methods inherited from class javax.mail.Multipart
addBodyPart, addBodyPart, getContentType, getParent, removeBodyPart, removeBodyPart, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeContent

public MimeContent()
Method Detail

addImage

public void addImage(java.awt.image.BufferedImage img)
              throws java.io.IOException
Adds an jpeg image to the document.

Parameters:
img - a buffered image content.
Throws:
java.io.IOException

addTextList

public void addTextList(java.util.List tl)
Adds a list of text strings to the document. Each element is added as a separate text part.

Parameters:
tl - a list of text strings.

addTextMedia

public void addTextMedia(java.lang.String aTextPart)
Adds a text part to the document. It is assumed to be us-ascii text.

Parameters:
aTextPart - the text to be added.

byteArrayContent

public byte[] byteArrayContent()
Provides the MIME document content.

Returns:
A byte array of the complete content.