Class BasePacket

    • Constructor Detail

      • BasePacket

        public BasePacket()
    • Method Detail

      • getParent

        public IPacket getParent()
        Description copied from interface: IPacket
        Obtain the parent packet.
        Specified by:
        getParent in interface IPacket
        Returns:
        parent packet
      • setParent

        public IPacket setParent​(IPacket parent)
        Description copied from interface: IPacket
        Configure a new parent packet.
        Specified by:
        setParent in interface IPacket
        Parameters:
        parent - new parent
        Returns:
        self
      • getPayload

        public IPacket getPayload()
        Description copied from interface: IPacket
        Obtain the packet payload.
        Specified by:
        getPayload in interface IPacket
        Returns:
        the payload
      • setPayload

        public IPacket setPayload​(IPacket payload)
        Description copied from interface: IPacket
        Assign the packet payload.
        Specified by:
        setPayload in interface IPacket
        Parameters:
        payload - new payload
        Returns:
        self
      • resetChecksum

        public void resetChecksum()
        Description copied from interface: IPacket
        Reset any checksum as needed, and call resetChecksum on all parents.
        Specified by:
        resetChecksum in interface IPacket
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • clone

        public java.lang.Object clone()
        This implementation of clone() is here to preserve backwards compatibility. Applications should not use clone() and instead use the duplicate() methods on the packet classes.
        Overrides:
        clone in class java.lang.Object
        Returns:
        copy of packet