public final class UdpPacketImpl extends TransportPacketImpl implements UDPPacket
| Constructor and Description |
|---|
UdpPacketImpl(IPPacket parent,
Buffer headers,
Buffer payload) |
| Modifier and Type | Method and Description |
|---|---|
TransportPacket |
clone() |
int |
getChecksum() |
int |
getHeaderLength() |
int |
getLength() |
boolean |
isUDP() |
void |
setLength(int length) |
void |
write(OutputStream out,
Buffer payload)
Writes this packet to the
OutputStream with the supplied payload. |
getArrivalTime, getDestinationPort, getNextPacket, getParentPacket, getSourcePort, isSCTP, isTCP, setDestinationPort, setSourcePort, verifycheckParent, getName, getPacket, getPayload, getProtocol, hasProtocol, writeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParentPacketgetDestinationPort, getSourcePort, isSCTP, isTCP, setDestinationPort, setSourcePortgetArrivalTime, getName, getNextPacket, getPacket, getPayload, getProtocol, hasProtocol, verify, writepublic boolean isUDP()
isUDP in interface TransportPacketisUDP in class TransportPacketImplpublic int getHeaderLength()
getHeaderLength in interface TransportPacketpublic void setLength(int length)
public int getChecksum()
getChecksum in interface UDPPacketpublic TransportPacket clone()
clone in interface Packetclone in interface TransportPacketclone in class TransportPacketImplpublic final void write(OutputStream out, Buffer payload) throws IOException
PacketOutputStream with the supplied payload.
You can use this method to e.g. write a raw UDPPacket to the
stream with this payload. Note, if the UDPPacket already had a
payload it will be ignored so use this method with care.write in interface PacketIOExceptionCopyright © 2021. All Rights Reserved.