I
InsightNexus

EventData (Azure SDK for Java Reference Documentation)

Author

James Stevens

Published Feb 16, 2026

EventData (Azure SDK for Java Reference Documentation)
    • Constructor Summary

      Constructors 
      Constructor and Description
      EventData(byte[] body)

      Creates an event containing the body.

      EventData(ByteBuffer body)

      Creates an event containing the body.

      EventData(String body)

      Creates an event by encoding the body using UTF-8 charset.

    • Method Summary

    • Constructor Detail

      • EventData

        public EventData(byte[] body)

        Creates an event containing the body.

        Parameters:
        body - The data to set for this event.
        Throws:
        NullPointerException - if body is null.
      • EventData

        public EventData(ByteBuffer body)

        Creates an event containing the body.

        Parameters:
        body - The data to set for this event.
        Throws:
        NullPointerException - if body is null.
      • EventData

        public EventData(String body)

        Creates an event by encoding the body using UTF-8 charset.

        Parameters:
        body - The string that will be UTF-8 encoded to create an event.
        Throws:
        NullPointerException - if body is null.
    • Method Detail

      • getBodyAsString

        public String getBodyAsString()

        Returns event data as UTF-8 decoded string.

        Returns:
        UTF-8 decoded string representation of the event data.

Copyright © 2019 Microsoft Corporation. All rights reserved.