|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.beep4j.internal.message.DefaultMessage
public class DefaultMessage
Field Summary |
---|
Fields inherited from interface net.sf.beep4j.Message |
---|
BASE64_TRANSFER_ENCODING, BINARY_TRANSFER_ENCODING, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE |
Constructor Summary | |
---|---|
DefaultMessage(MessageHeader header,
java.nio.ByteBuffer content)
|
Method Summary | |
---|---|
java.nio.ByteBuffer |
asByteBuffer()
Writes the complete message (headers and content) into a ByteBuffer, which can then be used to send the message over the network. |
boolean |
equals(java.lang.Object obj)
|
protected java.lang.String |
getCharsetName()
|
java.nio.ByteBuffer |
getContentBuffer()
Gets the content as a ByteBuffer. |
java.lang.String |
getContentType()
Gets the content type of the message. |
java.lang.String |
getHeader(java.lang.String name)
Gets the value of the header with the given name. |
java.util.Iterator<java.lang.String> |
getHeaderNames()
Gets the list of all defined header names. |
java.io.InputStream |
getInputStream()
Gets an InputStream to read the content of the message. |
java.io.Reader |
getReader()
Gets a Reader to read the content of the message. |
java.io.Reader |
getReader(java.lang.String charsetName)
Gets a Reader to read the content of the message. |
protected java.lang.String |
getTransferEncoding()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessage(MessageHeader header, java.nio.ByteBuffer content)
Method Detail |
---|
public java.lang.String getContentType()
Message
getContentType
in interface Message
protected java.lang.String getCharsetName()
protected java.lang.String getTransferEncoding()
public java.util.Iterator<java.lang.String> getHeaderNames()
Message
getHeaderNames
in interface Message
public java.lang.String getHeader(java.lang.String name)
Message
getHeader
in interface Message
name
- the name of the header
public java.io.InputStream getInputStream()
Message
Message.getReader()
method, which
returns a fully configured Reader.
getInputStream
in interface Message
public java.io.Reader getReader()
Message
getReader
in interface Message
public java.io.Reader getReader(java.lang.String charsetName)
Message
getReader
in interface Message
charsetName
- the name of the charset
public java.nio.ByteBuffer getContentBuffer()
Message
getContentBuffer
in interface Message
public java.nio.ByteBuffer asByteBuffer()
Message
asByteBuffer
in interface Message
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |