Enum Class Mqtt5PayloadFormatIndicator
java.lang.Object
java.lang.Enum<Mqtt5PayloadFormatIndicator>
com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5PayloadFormatIndicator
- All Implemented Interfaces:
Serializable,Comparable<Mqtt5PayloadFormatIndicator>,Constable
Payload Format Indicator according to the MQTT 5 specification.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPayload consists of unspecified bytes.Payload consists of UTF-8 encoded character data as defined by the Unicode specification and restated in RFC 3629. -
Method Summary
Modifier and TypeMethodDescriptionfromCode(int code) Returns the Payload Format Indicator belonging to the given byte code.intgetCode()static Mqtt5PayloadFormatIndicatorReturns the enum constant of this class with the specified name.static Mqtt5PayloadFormatIndicator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSPECIFIED
Payload consists of unspecified bytes. -
UTF_8
Payload consists of UTF-8 encoded character data as defined by the Unicode specification and restated in RFC 3629.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()- Returns:
- the byte code of this Payload Format Indicator.
-
fromCode
Returns the Payload Format Indicator belonging to the given byte code.- Parameters:
code- the byte code.- Returns:
- the Payload Format Indicator belonging to the byte code or null if the byte code is not a valid Payload Format Indicator.
-