|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.beep4j.internal.message.DefaultMessageBuilder
public class DefaultMessageBuilder
Constructor Summary | |
---|---|
DefaultMessageBuilder()
|
Method Summary | |
---|---|
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds an arbitrary header field. |
java.nio.ByteBuffer |
getContentBuffer(int size)
Allocates a ByteBuffer into which the message content can be written. |
Message |
getMessage()
Retrieves the resulting message object. |
java.io.OutputStream |
getOutputStream()
Gets the underlying OutputStream that can be used to write binary messages. |
java.io.Writer |
getWriter()
Gets the underlying Writer that can be used to write textual messages. |
void |
setCharsetName(java.lang.String charset)
Sets the character encoding used by the message. |
void |
setContentType(java.lang.String type,
java.lang.String subtype)
Sets the content type of the message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessageBuilder()
Method Detail |
---|
public void addHeader(java.lang.String name, java.lang.String value)
MessageBuilder
addHeader
in interface MessageBuilder
name
- the name of the headervalue
- the valuepublic void setCharsetName(java.lang.String charset)
MessageBuilder
setCharsetName
in interface MessageBuilder
charset
- the charsetpublic void setContentType(java.lang.String type, java.lang.String subtype)
MessageBuilder
setContentType
in interface MessageBuilder
type
- the typesubtype
- the subtypepublic java.io.OutputStream getOutputStream()
MessageBuilder
getOutputStream
in interface MessageBuilder
public java.io.Writer getWriter()
MessageBuilder
getWriter
in interface MessageBuilder
public java.nio.ByteBuffer getContentBuffer(int size)
MessageBuilder
getContentBuffer
in interface MessageBuilder
size
- the size of the ByteBuffer
public Message getMessage()
MessageBuilder
getMessage
in interface MessageBuilder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |