Enum HeaderType
- java.lang.Object
-
- java.lang.Enum<HeaderType>
-
- software.amazon.awssdk.crt.eventstream.HeaderType
-
- All Implemented Interfaces:
Serializable
,Comparable<HeaderType>
public enum HeaderType extends Enum<HeaderType>
Java mirror of the native aws_event_stream_header_value_type enum, specifying properties of the type of a header's value
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BooleanFalse
BooleanTrue
Byte
ByteBuf
Int16
Int32
Int64
String
TimeStamp
UUID
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEnumIntValue()
static HeaderType
getValueFromInt(int intValue)
Creates a Java header type enum from an associated native integer valueint
getWireBytesOverhead()
boolean
isVariableLength()
static HeaderType
valueOf(String name)
Returns the enum constant of this type with the specified name.static HeaderType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BooleanTrue
public static final HeaderType BooleanTrue
-
BooleanFalse
public static final HeaderType BooleanFalse
-
Byte
public static final HeaderType Byte
-
Int16
public static final HeaderType Int16
-
Int32
public static final HeaderType Int32
-
Int64
public static final HeaderType Int64
-
ByteBuf
public static final HeaderType ByteBuf
-
String
public static final HeaderType String
-
TimeStamp
public static final HeaderType TimeStamp
-
UUID
public static final HeaderType UUID
-
-
Method Detail
-
values
public static HeaderType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HeaderType c : HeaderType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HeaderType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getWireBytesOverhead
public int getWireBytesOverhead()
- Returns:
- additional bytes needed to serialize the header's value, beyond the value's data itself
-
getEnumIntValue
public int getEnumIntValue()
- Returns:
- the native integer value associated with this Java enum value
-
isVariableLength
public boolean isVariableLength()
- Returns:
- true if encoding this type requires a variable number of bytes, false if a fixed number of bytes
-
getValueFromInt
public static HeaderType getValueFromInt(int intValue)
Creates a Java header type enum from an associated native integer value- Parameters:
intValue
- native integer value- Returns:
- a new Java header type value
-
-