public abstract class AbstractFrame extends Object implements Frame
| Constructor and Description |
|---|
AbstractFrame(FramerManager framerManager,
PcapGlobalHeader header,
Protocol p,
Buffer payload) |
| Modifier and Type | Method and Description |
|---|---|
void |
frameAll()
Frame all protocols within this frame.
|
protected abstract Frame |
framePayload(FramerManager framerManager,
Buffer payload)
Each implementing frame needs to figure out how to frame its payload.
|
Frame |
getFrame(Protocol p)
Find the frame for protocol p.
|
String |
getName()
Get the name of the frame.
|
Frame |
getNextFrame()
Get the next frame, or null if there is none.
|
Buffer |
getPayload()
Get the payload of the frame.
|
PcapGlobalHeader |
getPcapGlobalHeader()
Each
Frame was captured in a pcap that had this
PcapGlobalHeader. |
Protocol |
getProtocol()
Get the protocol of this frame.
|
boolean |
hasProtocol(Protocol p)
Check whether this frame contains a particular protocol.
|
void |
readExternal(ObjectInput in) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArrivalTime, parse, writewriteExternalpublic AbstractFrame(FramerManager framerManager, PcapGlobalHeader header, Protocol p, Buffer payload)
public final boolean hasProtocol(Protocol p) throws IOException
hasProtocol in interface FrameIOException - in case something goes wrong when framing the rest of the
protocol stackpublic final Protocol getProtocol()
getProtocol in interface Framepublic final Frame getFrame(Protocol p) throws IOException
getFrame in interface FrameIOException - in case something goes wrong when framing the rest of the
protocol stackpublic final void frameAll()
throws IOException
frameAll in interface FrameIOExceptionpublic final String getName()
public final Frame getNextFrame() throws IOException
getNextFrame in interface FrameIOExceptionpublic final Buffer getPayload()
getPayload in interface Framepublic PcapGlobalHeader getPcapGlobalHeader()
FrameFrame was captured in a pcap that had this
PcapGlobalHeader. Using this header you can create a new
PcapOutputStream and then write this Frame to the output
stream without having to worry about which byte order etc this
Frame is encoded in.getPcapGlobalHeader in interface Frameprotected abstract Frame framePayload(FramerManager framerManager, Buffer payload) throws IOException
payload - IOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2021. All Rights Reserved.