public static final class UdpPacket.UdpHeader extends AbstractPacket.AbstractHeader implements TransportPacket.TransportHeader
Modifier and Type | Method and Description |
---|---|
protected String |
buildString()
This method builds the value
toString() will return. |
protected int |
calcHashCode()
This method builds the value
hashCode() will return using the byte array
getRawData() returns. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one using return values of
getRawData() . |
short |
getChecksum() |
UdpPort |
getDstPort() |
short |
getLength() |
int |
getLengthAsInt() |
protected List<byte[]> |
getRawFields()
Returns a list of byte arrays which represents this header's fields.
|
UdpPort |
getSrcPort() |
int |
length()
Returns the header length in bytes.
|
buildHexString, buildRawData, calcLength, getRawData, hashCode, toHexString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getRawData
public UdpPort getSrcPort()
getSrcPort
in interface TransportPacket.TransportHeader
public UdpPort getDstPort()
getDstPort
in interface TransportPacket.TransportHeader
public short getLength()
public int getLengthAsInt()
public short getChecksum()
protected List<byte[]> getRawFields()
AbstractPacket.AbstractHeader
calcLength()
and buildRawData()
.getRawFields
in class AbstractPacket.AbstractHeader
public int length()
AbstractPacket.AbstractHeader
calcLength()
and
caches the return value when it is called for the first time, and then, this method returns
the cached value from the second time.length
in interface Packet.Header
length
in class AbstractPacket.AbstractHeader
protected String buildString()
AbstractPacket.AbstractHeader
toString()
will return.buildString
in class AbstractPacket.AbstractHeader
public boolean equals(Object obj)
AbstractPacket.AbstractHeader
getRawData()
. This method should be overridden so that it does more strict
comparisons more efficiently.equals
in class AbstractPacket.AbstractHeader
protected int calcHashCode()
AbstractPacket.AbstractHeader
hashCode()
will return using the byte array
getRawData()
returns. This method may be better to be overridden for
performance reason.calcHashCode
in class AbstractPacket.AbstractHeader
Copyright © 2011–2019 Pcap4J.org. All rights reserved.