|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.mime4j.message.Entity
public abstract class Entity
MIME entity. An entity has a header and a body (see RFC 2045).
Constructor Summary | |
---|---|
Entity()
|
Method Summary | |
---|---|
Body |
getBody()
Gets the body of this entity. |
java.lang.String |
getCharset()
Determines the MIME character set encoding of this Entity . |
java.lang.String |
getContentTransferEncoding()
Determines the transfer encoding of this Entity . |
Header |
getHeader()
Gets the entity header. |
java.lang.String |
getMimeType()
Determines the MIME type of this Entity . |
Entity |
getParent()
Gets the parent entity of this entity. |
boolean |
isMimeType(java.lang.String type)
Determines if the MIME type of this Entity matches the
given one. |
boolean |
isMultipart()
Determines if the MIME type of this Entity is
multipart/* . |
void |
setBody(Body body)
Sets the body of this entity. |
void |
setHeader(Header header)
Sets the entity header. |
void |
setParent(Entity parent)
Sets the parent entity of this entity. |
void |
writeTo(java.io.OutputStream out,
int mode)
Write the content to the given outputstream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Entity()
Method Detail |
---|
public Entity getParent()
null
if this is the root entity.
null
.public void setParent(Entity parent)
parent
- the parent entity or null
if
this will be the root entity.public Header getHeader()
public void setHeader(Header header)
header
- the header.public Body getBody()
public void setBody(Body body)
body
- the body.public java.lang.String getMimeType()
Entity
. The MIME type
is derived by looking at the parent's Content-Type field if no
Content-Type field is set for this Entity
.
public java.lang.String getCharset()
Entity
.
public java.lang.String getContentTransferEncoding()
Entity
.
public boolean isMimeType(java.lang.String type)
Entity
matches the
given one. MIME types are case-insensitive.
type
- the MIME type to match against.
true
on match, false
otherwise.public boolean isMultipart()
Entity
is
multipart/*
. Since multipart-entities must have
a boundary parameter in the Content-Type
field this
method returns false
if no boundary exists.
true
on match, false
otherwise.public void writeTo(java.io.OutputStream out, int mode) throws java.io.IOException, MimeException
out
- the outputstream to write tomode
- output mode MessageUtils
java.io.IOException
MimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |