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

public enum Mqtt5PayloadFormatIndicator extends Enum<Mqtt5PayloadFormatIndicator>
Payload Format Indicator according to the MQTT 5 specification.
Since:
1.0
  • Enum Constant Details

    • UNSPECIFIED

      public static final Mqtt5PayloadFormatIndicator UNSPECIFIED
      Payload consists of unspecified bytes.
    • UTF_8

      public static final Mqtt5PayloadFormatIndicator UTF_8
      Payload consists of UTF-8 encoded character data as defined by the Unicode specification and restated in RFC 3629.
  • Method Details

    • values

      public static Mqtt5PayloadFormatIndicator[] 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

      public static Mqtt5PayloadFormatIndicator valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      Returns:
      the byte code of this Payload Format Indicator.
    • fromCode

      @Nullable public static @Nullable Mqtt5PayloadFormatIndicator fromCode(int code)
      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.