Class UDPDecoder

  • All Implemented Interfaces:
    Decoder

    public class UDPDecoder
    extends Object
    implements Decoder
    Decode UDP packets
    • Constructor Detail

      • UDPDecoder

        public UDPDecoder()
      • UDPDecoder

        public UDPDecoder​(boolean allowfail)
    • Method Detail

      • reassemble

        public Packet reassemble​(Packet packet,
                                 byte[] packetData)
        Decode the udp packet, supports reassembly of fragmented packets
        Specified by:
        reassemble in interface Decoder
        Parameters:
        packet - the packet to reassemble
        packetData - bytes to decode
        Returns:
        payload bytes or null if not a valid packet
      • decode

        public byte[] decode​(byte[] packetData)
      • printStats

        public void printStats()
        Specified by:
        printStats in interface Decoder