Class EAP

  • All Implemented Interfaces:
    IPacket

    public class EAP
    extends BasePacket
    EAP (Extensible Authentication Protocol) packet.
    • Constructor Detail

      • EAP

        public EAP()
        Default EAP constructor that sets the EAP code to 0.
      • EAP

        public EAP​(byte code,
                   byte identifier,
                   byte type,
                   byte[] data)
        EAP constructor that initially sets all fields.
        Parameters:
        code - EAP code
        identifier - EAP identifier
        type - packet type
        data - EAP data
    • Method Detail

      • getCode

        public byte getCode()
        Gets the EAP code.
        Returns:
        EAP code
      • setCode

        public EAP setCode​(byte code)
        Sets the EAP code.
        Parameters:
        code - EAP code
        Returns:
        this
      • getIdentifier

        public byte getIdentifier()
        Gets the EAP identifier.
        Returns:
        EAP identifier
      • setIdentifier

        public EAP setIdentifier​(byte identifier)
        Sets the EAP identifier.
        Parameters:
        identifier - EAP identifier
        Returns:
        this
      • getLength

        public short getLength()
        Gets the get packet length.
        Returns:
        packet length
      • setLength

        public EAP setLength​(short length)
        Sets the packet length.
        Parameters:
        length - packet length
        Returns:
        this
      • getDataType

        public byte getDataType()
        Gets the data type.
        Returns:
        data type
      • setDataType

        public EAP setDataType​(byte type)
        Sets the data type.
        Parameters:
        type - data type
        Returns:
        this
      • getData

        public byte[] getData()
        Gets the EAP data.
        Returns:
        EAP data
      • setData

        public EAP setData​(byte[] data)
        Sets the EAP data.
        Parameters:
        data - EAP data to be set
        Returns:
        this
      • deserializer

        public static Deserializer<EAP> deserializer()
        Deserializer for EAP packets.
        Returns:
        deserializer
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads