public enum PacketType extends Enum<PacketType>
UtpPacket| Modifier and Type | Method and Description |
|---|---|
Payload |
createPayload(ByteBuffer data)
Factory method to create payload instances.
|
static PacketType |
getByType(int typeField) |
byte |
getTypeField() |
static PacketType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PacketType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PacketType DATA
public static final PacketType FIN
public static final PacketType STATE
public static final PacketType RESET
public static final PacketType SYN
public static PacketType[] values()
for (PacketType c : PacketType.values()) System.out.println(c);
public static PacketType 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 byte getTypeField()
public Payload createPayload(ByteBuffer data)
data - The read data from the streampublic static PacketType getByType(int typeField)
typeField - The typeField value of the enum.IllegalArgumentException - When the typeField does not exist.Copyright © 2017. All rights reserved.