public final class StompEncoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static byte |
COLON |
private static byte |
LF |
private Log |
logger |
private static java.nio.charset.Charset |
UTF8_CHARSET |
Constructor and Description |
---|
StompEncoder() |
Modifier and Type | Method and Description |
---|---|
byte[] |
encode(Message<byte[]> message)
Encodes the given STOMP
message into a byte[] |
private byte[] |
encodeHeaderString(java.lang.String input,
boolean escape) |
private java.lang.String |
escape(java.lang.String inString)
See STOMP Spec 1.2:
"Value Encoding".
|
private void |
writeBody(Message<byte[]> message,
java.io.DataOutputStream output) |
private void |
writeHeaders(StompHeaderAccessor headers,
Message<byte[]> message,
java.io.DataOutputStream output) |
private static final byte LF
private static final byte COLON
private static final java.nio.charset.Charset UTF8_CHARSET
private final Log logger
public byte[] encode(Message<byte[]> message)
message
into a byte[]
message
- the message to encodeprivate void writeHeaders(StompHeaderAccessor headers, Message<byte[]> message, java.io.DataOutputStream output) throws java.io.IOException
java.io.IOException
private byte[] encodeHeaderString(java.lang.String input, boolean escape)
private java.lang.String escape(java.lang.String inString)
private void writeBody(Message<byte[]> message, java.io.DataOutputStream output) throws java.io.IOException
java.io.IOException