Package com.google.android.exoplayer2.metadata.emsg

## Class EventMessageEncoder

- java.lang.Object
- - com.google.android.exoplayer2.metadata.emsg.EventMessageEncoder

-     public final class EventMessageEncoder
      extends Object

  Encodes data that can be decoded by `EventMessageDecoder`. This class isn't thread safe.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventMessageEncoder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `byte[]` | `encode​(EventMessage eventMessage)` | Encodes an `EventMessage` to a byte array that can be decoded by `EventMessageDecoder`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EventMessageEncoder

          public EventMessageEncoder()

  - ### Method Detail

    - #### encode

          public byte[] encode​(EventMessage eventMessage)

      Encodes an `EventMessage` to a byte array that can be decoded by `EventMessageDecoder`.
      Parameters:
        `eventMessage` - The event message to be encoded.
      Returns:
        The serialized byte array.