Package org.linphone.core
Interface Buffer
public interface Buffer
The object representing a data buffer.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Get the content of the data buffer.long
Gets the native pointer used by this class to make native method calls.int
getSize()
Get the size of the content of the data buffer.Get the string content of the data buffer.Gets the object stored in this object user's databoolean
isEmpty()
Tell whether theBuffer
is empty.newFromData
(byte[] data, int size) Create a newBuffer
object from existing data.newFromString
(String data) Create a newBuffer
object from a string.void
setContent
(byte[] content, int size) Set the content of the data buffer.void
setSize
(int size) Set the size of the content of the data buffer.void
setStringContent
(String content) Set the string content of the data buffer.void
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getContent
@NonNull byte[] getContent()Get the content of the data buffer.
- Returns:
- The content of the data buffer.
-
isEmpty
boolean isEmpty()- 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
Get the string content of the data buffer.
- Returns:
- The string content of the data buffer.
-
setStringContent
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
- 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
- Parameters:
data
- The initial string content of the LinphoneBuffer.- Returns:
- A new
Buffer
object.
-
setUserData
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()
-