| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.marre.mime.MimeBodyPart
Represents a MIME body part. A body part can contain headers and a body.
| Field Summary | |
protected  byte[] | 
myBody
 | 
protected  MimeContentType | 
myContentType
 | 
protected  java.util.List | 
myHeaders
 | 
| Constructor Summary | |
MimeBodyPart()
Creates a new empty MimeBodyPart.  | 
|
MimeBodyPart(byte[] body,
             MimeContentType contentType)
Creates a new empty MimeBodyPart.  | 
|
MimeBodyPart(byte[] body,
             java.lang.String contentType)
Creates a new empty MimeBodyPart.  | 
|
| Method Summary | |
 void | 
addHeader(MimeHeader theHeader)
Adds a mime header to this body part.  | 
 void | 
addHeader(java.lang.String theHeaderName,
          java.lang.String theHeaderValue)
Adds a eader to this body part.  | 
 byte[] | 
getBody()
Returns the content of this body part.  | 
 int | 
getBodySize()
Returns the size of the body in this body part.  | 
 MimeContentType | 
getContentType()
Returns the content type.  | 
 MimeHeader | 
getHeader(int theIndex)
Retrieves a header with the given index.  | 
 MimeHeader | 
getHeader(java.lang.String headerName)
Retrieves a header with the given name.  | 
 int | 
getHeaderCount()
Returns the number of headers.  | 
 void | 
setContent(byte[] theContent,
           MimeContentType theContentType)
Sets the main content of this body part.  | 
 void | 
setContent(byte[] theContent,
           java.lang.String theContentType)
Sets the main content of this body part.  | 
 void | 
setContentId(java.lang.String theContentId)
Sets the "Content-Id" header.  | 
 void | 
setContentLocation(java.lang.String theContentLocation)
Sets the "Content-Location" header.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected byte[] myBody
protected MimeContentType myContentType
protected java.util.List myHeaders
| Constructor Detail | 
public MimeBodyPart()
public MimeBodyPart(byte[] body,
                    MimeContentType contentType)
public MimeBodyPart(byte[] body,
                    java.lang.String contentType)
| Method Detail | 
public void addHeader(MimeHeader theHeader)
theHeader - The header to add
public void addHeader(java.lang.String theHeaderName,
                      java.lang.String theHeaderValue)
theHeaderName - The name of the headertheHeaderValue - The valuepublic MimeHeader getHeader(int theIndex)
theIndex - Index of header to retrieve
public MimeHeader getHeader(java.lang.String headerName)
headerName - The name of the header to find
public int getHeaderCount()
public void setContent(byte[] theContent,
                       java.lang.String theContentType)
theContent - The main contenttheContentType - The content-type of the content
public void setContent(byte[] theContent,
                       MimeContentType theContentType)
theContent - The main contenttheContentType - The content typepublic void setContentId(java.lang.String theContentId)
theContentId - The content-idpublic void setContentLocation(java.lang.String theContentLocation)
theContentLocation - The content-locationpublic byte[] getBody()
public int getBodySize()
public MimeContentType getContentType()
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||