Interface ByteDecoder

All Superinterfaces:
Source
All Known Implementing Classes:
NetStreamDecoder

public interface ByteDecoder
extends Source
Decode an event that has been encoded into a binary buffer and dispatch this event to its sources. This is a complementary features of the event encoding in ByteEncoder.
Since:
31/01/16.
  • Method Details

    • decode

      void decode​(ByteBuffer buffer)
      Decode the buffer, and dispatch the corresponding event.
      Parameters:
      buffer - event as a binary buffer
    • validate

      boolean validate​(ByteBuffer buffer)
      Tells if the buffer contains an event that is ready to be dispatched. The bytes considered should be from 0 to the buffer's position. The position of the buffer SHOULD NOT be changed.
      Parameters:
      buffer -
      Returns:
      true if the buffer contains an event