Class UDPPacketReader


  • class UDPPacketReader
    extends Object
    To read a packet, initialize this reader with the data and fetch out the appropriate fields. If the interesting bits are in message specific elements, grab the appropriate subreader. Many of the methods here and in the subclasses will throw AIOOBE on malformed packets, that should be caught also.
    • Constructor Detail

    • Method Detail

      • initialize

        public void initialize​(UDPPacket packet)
      • readPayloadType

        public int readPayloadType()
        what type of payload is in here?
      • isRekeyingIncluded

        public boolean isRekeyingIncluded()
        Does this packet include rekeying data in the header? Unused, should always be false.
      • isExtendedOptionsIncluded

        public boolean isExtendedOptionsIncluded()
        Does this packet include extended options in the header?
      • readTimestamp

        public long readTimestamp()
        Returns:
        seconds
      • readKeyingMaterial

        @Deprecated
        public byte[] readKeyingMaterial()
        Deprecated.
        unused
        Returns rekeying data (64 bytes), or null if none. Unused, should always return null.
      • readExtendedOptions

        public byte[] readExtendedOptions()
        Returns extended option data, 0-255 bytes, or null if none. Returned array does NOT include the length byte.
        Returns:
        extended options or null if none is included
        Since:
        0.9.24