public final class PcapRecordHeader
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
pcaprec_hdr_s struct is SIZE bytes long.
|
| Constructor and Description |
|---|
PcapRecordHeader(java.nio.ByteOrder byteOrder,
Buffer body) |
| 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 |
getTimeStampMicroSeconds() |
long |
getTimeStampSeconds() |
long |
getTotalLength()
Get the total length of the data.
|
void |
setCapturedLength(long length) |
void |
setTotalLength(long length) |
java.lang.String |
toString() |
void |
write(java.io.OutputStream out) |
public static final int SIZE
public PcapRecordHeader(java.nio.ByteOrder byteOrder,
Buffer body)
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()
public long getTimeStampMicroSeconds()
public long getTotalLength()
public void setTotalLength(long length)
public long getCapturedLength()
public void setCapturedLength(long length)
public void write(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.