public enum BinaryLengthLength extends Enum<BinaryLengthLength>
Enum Constant and Description |
---|
LENGTH_16BIT
Represents a 16-bit length encoding for binary data.
|
LENGTH_32BIT
Represents a 32-bit length encoding for binary data.
|
LENGTH_8BIT
Represents an 8-bit length encoding for binary data.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
code()
Returns the code representing the length encoding.
|
abstract long |
initialise(@NotNull BytesOut<?> bytes)
Initialises the binary data with the appropriate length encoding.
|
static BinaryLengthLength |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BinaryLengthLength[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
abstract void |
writeLength(@NotNull Bytes<?> bytes,
long positionReturnedFromInitialise,
long end)
Writes the length of the data into the
Bytes object. |
public static final BinaryLengthLength LENGTH_8BIT
public static final BinaryLengthLength LENGTH_16BIT
public static final BinaryLengthLength LENGTH_32BIT
public static BinaryLengthLength[] values()
for (BinaryLengthLength c : BinaryLengthLength.values()) System.out.println(c);
public static BinaryLengthLength valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract int code()
public abstract long initialise(@NotNull @NotNull BytesOut<?> bytes)
bytes
- the output bytes to write toCopyright © 2024. All rights reserved.