public final class PcapPacket extends AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeaderPacket.Builder, Packet.Header| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
buildString()
This method builds the value
toString() will return by
concatenating the header's string representation and the payload's string representation. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
Packet.Builder |
getBuilder()
This method returns the same object as
getPacket().getBuilder(). |
int |
getOriginalLength() |
Packet |
getPacket()
This method dissect the raw data.
|
Packet |
getPayload()
An alternative to
getPacket(). |
byte[] |
getRawData()
Get the raw data of the captured packet.
|
java.time.Instant |
getTimestamp() |
int |
hashCode()
Returns a hash code value for the object.
|
int |
length()
Get the length of the captured packet.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
buildHexString, buildRawData, calcHashCode, calcLength, getHeader, toHexStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, get, getOuterOf, iteratorpublic java.time.Instant getTimestamp()
public int getOriginalLength()
public Packet getPacket()
public Packet getPayload()
getPacket().
This method dissect the raw data.getPayload in interface PacketgetPayload in class AbstractPacketgetPacket().public int length()
length in interface Packetlength in class AbstractPacketpublic byte[] getRawData()
getRawData in interface PacketgetRawData in class AbstractPacketpublic Packet.Builder getBuilder()
getPacket().getBuilder().
This method dissect the raw data.getBuilder in interface PacketgetBuilder in class AbstractPacketBuilder instance of the captured packet.protected java.lang.String buildString()
AbstractPackettoString() will return by
concatenating the header's string representation and the payload's string representation.
If you write this subclass which represents a packet with extra parts (e.g. a trailer),
you need to override this method.buildString in class AbstractPacketpublic java.lang.String toString()
toString in class AbstractPacketpublic boolean equals(java.lang.Object o)
AbstractPacketequals in class AbstractPacketpublic int hashCode()
AbstractPacketcalcHashCode() 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.hashCode in class AbstractPacketCopyright © 2011 - 2018 Pcap4J.org. All rights reserved.