- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket
-
- org.pcap4j.packet.IcmpIdentifiablePacket
-
- org.pcap4j.packet.IcmpV4TimestampPacket
-
public final class IcmpV4TimestampPacket extends IcmpIdentifiablePacket
- Since:
- pcap4j 0.9.11
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIcmpV4TimestampPacket.Builderstatic classIcmpV4TimestampPacket.IcmpV4TimestampHeader-
Nested classes/interfaces inherited from class org.pcap4j.packet.IcmpIdentifiablePacket
IcmpIdentifiablePacket.IcmpIdentifiableHeader
-
Nested classes/interfaces inherited from class org.pcap4j.packet.AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeader
-
Nested classes/interfaces inherited from interface org.pcap4j.packet.Packet
Packet.Header
-
-
Field Summary
Fields Modifier and Type Field Description private IcmpV4TimestampPacket.IcmpV4TimestampHeaderheaderprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateIcmpV4TimestampPacket(byte[] rawData, int offset, int length)privateIcmpV4TimestampPacket(IcmpV4TimestampPacket.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IcmpV4TimestampPacket.BuildergetBuilder()Returns a new Builder object populated with this object's fields' values.IcmpV4TimestampPacket.IcmpV4TimestampHeadergetHeader()Returns the Header object representing this packet's header.static IcmpV4TimestampPacketnewPacket(byte[] rawData, int offset, int length)A static factory method.-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, buildRawData, buildString, calcHashCode, calcLength, contains, equals, get, getOuterOf, getPayload, getRawData, hashCode, iterator, length, toHexString, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
header
private final IcmpV4TimestampPacket.IcmpV4TimestampHeader header
-
-
Constructor Detail
-
IcmpV4TimestampPacket
private IcmpV4TimestampPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
IcmpV4TimestampPacket
private IcmpV4TimestampPacket(IcmpV4TimestampPacket.Builder builder)
-
-
Method Detail
-
newPacket
public static IcmpV4TimestampPacket newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new IcmpV4TimestampPacket object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getHeader
public IcmpV4TimestampPacket.IcmpV4TimestampHeader getHeader()
Description copied from class:AbstractPacketReturns the Header object representing this packet's header. This subclass have to override this method if the packet represented by the subclass has a header.- Specified by:
getHeaderin interfacePacket- Specified by:
getHeaderin classIcmpIdentifiablePacket- Returns:
- the Header object representing this packet's header. May be null if the header doesn't exist
-
getBuilder
public IcmpV4TimestampPacket.Builder getBuilder()
Description copied from interface:PacketReturns a new Builder object populated with this object's fields' values.- Specified by:
getBuilderin interfacePacket- Specified by:
getBuilderin classAbstractPacket- Returns:
- a new Builder object populated with this object's fields values
-
-