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.

    public interface Deserializer<U extends IPacket>
    Function to deserialize a packet from a byte-based input stream.
    • Method Detail

      • deserialize

        U deserialize​(byte[] data,
                      int offset,
                      int length)
               throws DeserializationException
        Deserialize a packet object from a byte array.
        data - input array to take packet bytes from
        offset - index where this packet header begins in the byte array
        length - length of the packet header
        a deserialized packet object
        DeserializationException - if the packet cannot be deserialized from the input