net.sourceforge.jpcap.net
Class Packet
java.lang.Object
|
+--net.sourceforge.jpcap.net.Packet
- Direct Known Subclasses:
- EthernetPacket
- public class Packet
- extends java.lang.Object
A network packet.
This class currently contains no implementation because only ethernet
is supported. In other words, all instances of packets returned by
packet factory will always be at least as specific as EthernetPacket.
On large ethernet networks, I sometimes see packets which don't have
link-level ethernet headers. If and when I figure out what these are,
maybe this class will be the root node of a packet hierarchy derived
from something other than ethernet.
Method Summary |
java.lang.String |
getColor()
|
byte[] |
getData()
Fetch data portion of the packet. |
byte[] |
getHeader()
Fetch data portion of the packet. |
java.lang.String |
toColoredString(boolean colored)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Packet
public Packet()
toColoredString
public java.lang.String toColoredString(boolean colored)
getHeader
public byte[] getHeader()
- Fetch data portion of the packet.
getData
public byte[] getData()
- Fetch data portion of the packet.
getColor
public java.lang.String getColor()