public final class UdpPacket extends AbstractPacket
Modifier and Type | Class and Description |
---|---|
static class |
UdpPacket.Builder |
static class |
UdpPacket.UdpHeader |
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeader
Packet.Header
Modifier and Type | Method and Description |
---|---|
UdpPacket.Builder |
getBuilder() |
UdpPacket.UdpHeader |
getHeader() |
Packet |
getPayload() |
boolean |
hasValidChecksum(InetAddress srcAddr,
InetAddress dstAddr,
boolean acceptZero)
checksum varification is necessary for IPv6(i.e.
|
static UdpPacket |
newPacket(byte[] rawData,
int offset,
int length)
A static factory method.
|
buildHexString, buildRawData, buildString, calcHashCode, calcLength, contains, equals, get, getOuterOf, getRawData, hashCode, iterator, length, toHexString, toString
public static UdpPacket newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException
ByteArrays.validateBounds(byte[], int, int)
,
which may throw exceptions undocumented here.rawData
- offset
- length
- IllegalRawDataException
public UdpPacket.UdpHeader getHeader()
getHeader
in interface Packet
getHeader
in class AbstractPacket
public Packet getPayload()
getPayload
in interface Packet
getPayload
in class AbstractPacket
public boolean hasValidChecksum(InetAddress srcAddr, InetAddress dstAddr, boolean acceptZero)
srcAddr
- dstAddr
- acceptZero
- public UdpPacket.Builder getBuilder()
getBuilder
in interface Packet
getBuilder
in class AbstractPacket
Copyright © 2014. All Rights Reserved.