Class BytesCloudEventData

java.lang.Object
io.cloudevents.core.data.BytesCloudEventData
All Implemented Interfaces:
io.cloudevents.CloudEventData

public class BytesCloudEventData extends Object implements io.cloudevents.CloudEventData
An implementation of CloudEventData that wraps a byte array.
  • Constructor Details

    • BytesCloudEventData

      @Deprecated public BytesCloudEventData(byte[] value)
      Deprecated.
      Parameters:
      value - the bytes to wrap
  • Method Details

    • toBytes

      public byte[] toBytes()
      Specified by:
      toBytes in interface io.cloudevents.CloudEventData
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • wrap

      public static BytesCloudEventData wrap(byte[] value)
      Parameters:
      value - byte array to wrap
      Returns:
      byte array wrapped in a BytesCloudEventData, which implements CloudEventData.