public class MqttMessageEncoderUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
encodedLengthWithHeader(int encodedLength)
Calculates the encoded length with a prefixed header.
|
static int |
encodedOrEmptyLength(@Nullable java.nio.ByteBuffer byteBuffer) |
static int |
encodedPacketLength(int remainingLength)
Calculates the encoded length of a MQTT message with the given remaining length.
|
static void |
encodeNullable(@Nullable java.nio.ByteBuffer byteBuffer,
@NotNull io.netty.buffer.ByteBuf out) |
static void |
encodeNullable(@Nullable MqttUtf8StringImpl string,
@NotNull io.netty.buffer.ByteBuf out) |
static void |
encodeOrEmpty(@Nullable java.nio.ByteBuffer byteBuffer,
@NotNull io.netty.buffer.ByteBuf out) |
static @NotNull MqttEncodeException |
maximumPacketSizeExceeded(@NotNull MqttMessage message,
int encodedLength,
int maxPacketSize) |
static int |
nullableEncodedLength(@Nullable java.nio.ByteBuffer byteBuffer) |
static int |
nullableEncodedLength(@Nullable MqttUtf8StringImpl string) |
public static int encodedPacketLength(int remainingLength)
remainingLength
- the remaining length of the MQTT message.public static int encodedLengthWithHeader(int encodedLength)
encodedLength
- the encoded length.public static int nullableEncodedLength(@Nullable @Nullable MqttUtf8StringImpl string)
public static int nullableEncodedLength(@Nullable @Nullable java.nio.ByteBuffer byteBuffer)
public static int encodedOrEmptyLength(@Nullable @Nullable java.nio.ByteBuffer byteBuffer)
public static void encodeNullable(@Nullable @Nullable MqttUtf8StringImpl string, @NotNull @NotNull io.netty.buffer.ByteBuf out)
public static void encodeNullable(@Nullable @Nullable java.nio.ByteBuffer byteBuffer, @NotNull @NotNull io.netty.buffer.ByteBuf out)
public static void encodeOrEmpty(@Nullable @Nullable java.nio.ByteBuffer byteBuffer, @NotNull @NotNull io.netty.buffer.ByteBuf out)
@NotNull public static @NotNull MqttEncodeException maximumPacketSizeExceeded(@NotNull @NotNull MqttMessage message, int encodedLength, int maxPacketSize)