Interface Buffer


public interface Buffer
The object representing a data buffer.

  • Method Details

    • getContent

      @NonNull byte[] getContent()
      Get the content of the data buffer.

      Returns:
      The content of the data buffer.
    • isEmpty

      boolean isEmpty()
      Tell whether the Buffer is empty.

      Returns:
      A boolean value telling whether the Buffer is empty or not.
    • getSize

      int getSize()
      Get the size of the content of the data buffer.

      Returns:
      The size of the content of the data buffer.
    • setSize

      void setSize(int size)
      Set the size of the content of the data buffer.

      Parameters:
      size - The size of the content of the data buffer.
    • getStringContent

      @NonNull String getStringContent()
      Get the string content of the data buffer.

      Returns:
      The string content of the data buffer.
    • setStringContent

      void setStringContent(@NonNull String content)
      Set the string content of the data buffer.

      Parameters:
      content - The string content of the data buffer.
    • setContent

      void setContent(@NonNull byte[] content, int size)
      Set the content of the data buffer.

      Parameters:
      content - The content of the data buffer.
      size - The size of the content of the data buffer.
    • newFromData

      @NonNull Buffer newFromData(@NonNull byte[] data, int size)
      Create a new Buffer object from existing data.

      Parameters:
      data - The initial data to store in the LinphoneBuffer.
      size - The size of the initial data to stroe in the LinphoneBuffer.
      Returns:
      A new Buffer object.
    • newFromString

      @NonNull Buffer newFromString(@NonNull String data)
      Create a new Buffer object from a string.

      Parameters:
      data - The initial string content of the LinphoneBuffer.
      Returns:
      A new Buffer object.
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object