|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.mime4j.message.MessageWriter
public class MessageWriter
Writes a message (or a part of a message) to an output stream.
This class cannot be instantiated; instead the static instance
DEFAULT
implements the default strategy for writing a message.
This class may be subclassed to implement custom strategies for writing messages.
Field Summary | |
---|---|
static MessageWriter |
DEFAULT
The default message writer. |
Constructor Summary | |
---|---|
protected |
MessageWriter()
Protected constructor prevents direct instantiation. |
Method Summary | |
---|---|
protected OutputStream |
encodeStream(OutputStream out,
String encoding,
boolean binaryBody)
|
void |
writeBody(Body body,
OutputStream out)
Write the specified Body to the specified
OutputStream . |
void |
writeEntity(Entity entity,
OutputStream out)
Write the specified Entity to the specified
OutputStream . |
void |
writeHeader(Header header,
OutputStream out)
Write the specified Header to the specified
OutputStream . |
void |
writeMultipart(Multipart multipart,
OutputStream out)
Write the specified Multipart to the specified
OutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MessageWriter DEFAULT
Constructor Detail |
---|
protected MessageWriter()
Method Detail |
---|
public void writeBody(Body body, OutputStream out) throws IOException
Body
to the specified
OutputStream
.
body
- the Body
to write.out
- the OutputStream to write to.
IOException
- if an I/O error occurs.public void writeEntity(Entity entity, OutputStream out) throws IOException
Entity
to the specified
OutputStream
.
entity
- the Entity
to write.out
- the OutputStream to write to.
IOException
- if an I/O error occurs.public void writeMultipart(Multipart multipart, OutputStream out) throws IOException
Multipart
to the specified
OutputStream
.
multipart
- the Multipart
to write.out
- the OutputStream to write to.
IOException
- if an I/O error occurs.public void writeHeader(Header header, OutputStream out) throws IOException
Header
to the specified
OutputStream
.
header
- the Header
to write.out
- the OutputStream to write to.
IOException
- if an I/O error occurs.protected OutputStream encodeStream(OutputStream out, String encoding, boolean binaryBody) throws IOException
IOException
|
Apache JAMES Mime4j 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |