public class PppPacket extends AbstractPacket
| Modifier and Type | Class and Description |
|---|---|
static class |
PppPacket.Builder |
static class |
PppPacket.PppHeader |
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeaderPacket.Header| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
buildRawData()
This method builds the value
getRawData() will return by
concatenating the header's raw data and the payload's raw data. |
protected String |
buildString()
This method builds the value
toString() will return by
concatenating the header's string representation and the payload's string representation. |
protected int |
calcHashCode()
This method calculates the value
hashCode() will return using
the header's hash code and the payload's hash code. |
protected int |
calcLength()
This method calculates the value
length() will return by
adding up the header length and the payload length. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
PppPacket.Builder |
getBuilder()
Returns a new Builder object populated with this object's fields' values.
|
PppPacket.PppHeader |
getHeader()
Returns the Header object representing this packet's header.
|
byte[] |
getPad() |
Packet |
getPayload()
Returns the Packet object representing this packet's payload.
|
static PppPacket |
newPacket(byte[] rawData,
int offset,
int length)
A static factory method.
|
buildHexString, contains, get, getOuterOf, getRawData, hashCode, iterator, length, toHexString, toStringpublic static PppPacket newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException
ByteArrays.validateBounds(byte[], int, int),
which may throw exceptions undocumented here.rawData - rawDataoffset - offsetlength - lengthIllegalRawDataException - if parsing the raw data fails.public PppPacket.PppHeader getHeader()
AbstractPacketpublic PppPacket.Builder getBuilder()
PacketgetBuilder in interface PacketgetBuilder in class AbstractPacketpublic Packet getPayload()
AbstractPacketgetPayload in interface PacketgetPayload in class AbstractPacketpublic byte[] getPad()
protected int calcLength()
AbstractPacketlength() will return by
adding up the header length and the payload length.
If you write this subclass which represents a packet with extra parts (e.g. a trailer),
you need to override this method.calcLength in class AbstractPacketprotected byte[] buildRawData()
AbstractPacketgetRawData() will return by
concatenating the header's raw data and the payload's raw data.
If you write this subclass which represents a packet with extra parts (e.g. a trailer),
you need to override this method.buildRawData in class AbstractPacketprotected 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 boolean equals(Object obj)
AbstractPacketequals in class AbstractPacketprotected int calcHashCode()
AbstractPackethashCode() will return using
the header's hash code and the payload's hash code.
If you write this subclass which represents a packet with extra parts (e.g. a trailer),
you need to override this method.calcHashCode in class AbstractPacketCopyright © 2011–2016 Pcap4J.org. All rights reserved.