java.lang.Object
org.pcap4j.packet.AbstractPacket.AbstractBuilder
org.pcap4j.packet.IcmpV4CommonPacket.Builder
- All Implemented Interfaces:
Iterable<Packet.Builder>,ChecksumBuilder<IcmpV4CommonPacket>,Packet.Builder
- Enclosing class:
IcmpV4CommonPacket
public static final class IcmpV4CommonPacket.Builder
extends AbstractPacket.AbstractBuilder
implements ChecksumBuilder<IcmpV4CommonPacket>
- Since:
- pcap4j 0.9.11
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate shortprivate IcmpV4Codeprivate booleanprivate Packet.Builderprivate IcmpV4Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a packet object using values set to this object.checksum(short checksum) code(IcmpV4Code code) correctChecksumAtBuild(boolean correctChecksumAtBuild) Get the payload builder of this object.payloadBuilder(Packet.Builder payloadBuilder) Set the payload builder.type(IcmpV4Type type) Methods inherited from class org.pcap4j.packet.AbstractPacket.AbstractBuilder
get, getOuterOf, iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
type
-
code
-
checksum
private short checksum -
payloadBuilder
-
correctChecksumAtBuild
private boolean correctChecksumAtBuild
-
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
type
- Parameters:
type- type- Returns:
- this Builder object for method chaining.
-
code
- Parameters:
code- code- Returns:
- this Builder object for method chaining.
-
checksum
- Parameters:
checksum- checksum- Returns:
- this Builder object for method chaining.
-
payloadBuilder
Description copied from interface:Packet.BuilderSet the payload builder.- Specified by:
payloadBuilderin interfacePacket.Builder- Overrides:
payloadBuilderin classAbstractPacket.AbstractBuilder- Parameters:
payloadBuilder- a Builder object to set- Returns:
- this Builder object for method chaining
-
getPayloadBuilder
Description copied from interface:Packet.BuilderGet the payload builder of this object.- Specified by:
getPayloadBuilderin interfacePacket.Builder- Overrides:
getPayloadBuilderin classAbstractPacket.AbstractBuilder- Returns:
- the payload builder of this object
-
correctChecksumAtBuild
- Specified by:
correctChecksumAtBuildin interfaceChecksumBuilder<IcmpV4CommonPacket>- Parameters:
correctChecksumAtBuild- correctChecksumAtBuild- Returns:
- ChecksumBuilder
-
build
Description copied from interface:Packet.BuilderBuild a packet object using values set to this object.- Specified by:
buildin interfaceChecksumBuilder<IcmpV4CommonPacket>- Specified by:
buildin interfacePacket.Builder- Specified by:
buildin classAbstractPacket.AbstractBuilder- Returns:
- a new Packet object
-