io.agora.rtc

## Class Packet

- java.lang.Object
- - io.agora.rtc.Packet

-     public class Packet
      extends java.lang.Object

  Packet data structure.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private byte[]` | `buffer` Packet buffer
    `private int` | `size` Packet size

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Packet()` Default constructor for Packet.
    `Packet(byte[] buffer, int size)` Constructs Packet with buffer and size.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getBuffer()` Gets the packet buffer.
    `int` | `getSize()` Gets the packet size.
    `void` | `setBuffer(byte[] buffer)` Sets the packet buffer.
    `void` | `setSize(int size)` Sets the packet size.

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

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

- - ### Field Detail

    - #### buffer

          private byte[] buffer

      Packet buffer

    - #### size

          private int size

      Packet size

  - ### Constructor Detail

    - #### Packet

          public Packet()

      Default constructor for Packet.

    - #### Packet

          public Packet(byte[] buffer,
                        int size)

      Constructs Packet with buffer and size.
      Parameters:
        `buffer` - Packet buffer
        `size` - Packet size

  - ### Method Detail

    - #### getBuffer

          public byte[] getBuffer()

      Gets the packet buffer.
      Returns:
        Packet buffer

    - #### setBuffer

          public void setBuffer(byte[] buffer)

      Sets the packet buffer.
      Parameters:
        `buffer` - Packet buffer

    - #### getSize

          public int getSize()

      Gets the packet size.
      Returns:
        Packet size

    - #### setSize

          public void setSize(int size)

      Sets the packet size.
      Parameters:
        `size` - Packet size