Package zmq
Class Msg.Builder
- java.lang.Object
-
- zmq.Msg
-
- zmq.Msg.Builder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class zmq.Msg
Msg.Builder, Msg.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.ByteArrayOutputStream
out
-
Fields inherited from class zmq.Msg
COMMAND, CREDENTIAL, IDENTITY, MAX_GROUP_LENGTH, MORE, SHARED
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Msg
build()
Msg
put(byte[] src, int off, int len)
protected Msg
put(int index, byte b)
Msg
put(java.nio.ByteBuffer src, int off, int len)
Msg
putShortString(java.lang.String data)
Puts a string into the message, prefixed with its length.void
setFlags(int flags)
int
size()
-
Methods inherited from class zmq.Msg
buf, check, data, fd, flags, get, get, getBytes, getBytes, getGroup, getInt, getLong, getMetadata, getRoutingId, getShort, getWriteIndex, hasMore, initDelimiter, initJoin, initLeave, isCommand, isCredential, isDelimiter, isIdentity, isJoin, isLeave, put, put, put, put, resetFlags, resetMetadata, resetRoutingId, setFd, setGroup, setMetadata, setRoutingId, setWriteIndex, toString, transfer
-
-
-
-
Method Detail
-
putShortString
public Msg putShortString(java.lang.String data)
Description copied from class:Msg
Puts a string into the message, prefixed with its length. Users shall size the message by adding 1 to the length of the string: It needs to be able to accommodate (data.length+1) more bytes.- Overrides:
putShortString
in classMsg
- Parameters:
data
- a string shorter than 256 characters. If null, defaults to a no-op.- Returns:
- the same message.
-
build
public Msg build()
-
-