Package org.onlab.packet
Class Data
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.Data
-
- All Implemented Interfaces:
IPacket
public class Data extends BasePacket
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
data
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<Data>
deserializer()
Deserializer function for generic payload data.boolean
equals(java.lang.Object obj)
byte[]
getData()
int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.Data
setData(byte[] data)
java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Method Detail
-
getData
public byte[] getData()
- Returns:
- the data
-
setData
public Data setData(byte[] data)
- Parameters:
data
- the data to set- Returns:
- self
-
serialize
public byte[] serialize()
Description copied from interface:IPacket
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
deserializer
public static Deserializer<Data> deserializer()
Deserializer function for generic payload data.- Returns:
- deserializer function
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-