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
-
-
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, getInt, getLong, getMetadata, getShort, getWriteIndex, hasMore, initDelimiter, isCommand, isCredential, isDelimiter, isIdentity, put, put, put, put, resetFlags, resetMetadata, setFd, setMetadata, 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()
-
-