public final class PcapRecordHeader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
pcaprec_hdr_s struct is SIZE bytes long.
|
| Constructor and Description |
|---|
PcapRecordHeader(ByteOrder byteOrder,
Buffer body) |
PcapRecordHeader(ByteOrder byteOrder,
Buffer body,
boolean nsTimestamps) |
| Modifier and Type | Method and Description |
|---|---|
static PcapRecordHeader |
createDefaultHeader(long timestamp)
Create a default record header, which you must alter later on to match
whatever it is you are writing into the pcap stream.
|
long |
getCapturedLength()
Get the actual length of what is contained in this frame.
|
long |
getTimeStampMicroOrNanoSeconds() |
long |
getTimeStampMicroSeconds()
Deprecated.
|
long |
getTimeStampSeconds() |
long |
getTotalLength()
Get the total length of the data.
|
void |
setCapturedLength(long length) |
void |
setTotalLength(long length) |
String |
toString() |
void |
write(OutputStream out) |
public static final int SIZE
public static PcapRecordHeader createDefaultHeader(long timestamp)
timestamp - the timestamp in milliseconds since epoch. This is the
timestamp of when the packet "arrived"public long getTimeStampSeconds()
@Deprecated public long getTimeStampMicroSeconds()
public long getTimeStampMicroOrNanoSeconds()
public long getTotalLength()
public void setTotalLength(long length)
public long getCapturedLength()
public void setCapturedLength(long length)
public void write(OutputStream out) throws IOException
IOExceptionCopyright © 2021. All Rights Reserved.