com.kuka.comm.codec.bytebuffer
Enum LengthFieldType

java.lang.Object
  extended by java.lang.Enum<LengthFieldType>
      extended by com.kuka.comm.codec.bytebuffer.LengthFieldType
All Implemented Interfaces:
Serializable, Comparable<LengthFieldType>

public enum LengthFieldType
extends Enum<LengthFieldType>

The type of the length field of an byte-encoded message. This enum can be used together with LengthEncoder and LengthDecoder to specify the size of the length field.

See Also:
LengthEncoder, LengthDecoder

Enum Constant Summary
BYTE
          Length field with size 1 byte.
INT
          Length field with size 4 bytes.
SHORT
          Length field with size 2 bytes.
 
Method Summary
static LengthFieldType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LengthFieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BYTE

public static final LengthFieldType BYTE
Length field with size 1 byte.


SHORT

public static final LengthFieldType SHORT
Length field with size 2 bytes.


INT

public static final LengthFieldType INT
Length field with size 4 bytes.

Method Detail

values

public static LengthFieldType[] 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 (LengthFieldType c : LengthFieldType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LengthFieldType 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 name
NullPointerException - if the argument is null


Copyright © 2019. All rights reserved.