Interface PojoCloudEventData.ToBytes<T>

Type Parameters:
T - the source type of the conversion
Enclosing class:
PojoCloudEventData<T>
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 static interface PojoCloudEventData.ToBytes<T>
Interface defining a conversion from T to byte array. This is similar to Function but it allows checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    convert(T data)
     
  • Method Details

    • convert

      byte[] convert(T data) throws Exception
      Parameters:
      data - the POJO to convert
      Returns:
      the serialized byte array.
      Throws:
      Exception - when something goes wrong during the conversion.