Package org.onlab.packet
Interface Deserializer<U extends IPacket>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Deserializer<U extends IPacket>
Function to deserialize a packet from a byte-based input stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description U
deserialize(byte[] data, int offset, int length)
Deserialize a packet object from a byte array.
-
-
-
Method Detail
-
deserialize
U deserialize(byte[] data, int offset, int length) throws DeserializationException
Deserialize a packet object from a byte array.- Parameters:
data
- input array to take packet bytes fromoffset
- index where this packet header begins in the byte arraylength
- length of the packet header- Returns:
- a deserialized packet object
- Throws:
DeserializationException
- if the packet cannot be deserialized from the input
-
-