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.longGets the native pointer used by this class to make native method calls.intgetSize()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 databooleanisEmpty()Tell whether theBufferis empty.newFromData(byte[] data, int size) Create a newBufferobject from existing data.newFromString(String data) Create a newBufferobject from a string.voidsetContent(byte[] content, int size) Set the content of the data buffer.voidsetSize(int size) Set the size of the content of the data buffer.voidsetStringContent(String content) Set the string content of the data buffer.voidsetUserData(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
Bufferis 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 store in the LinphoneBuffer.- Returns:
- A new
Bufferobject.
-
newFromString
- Parameters:
data- The initial string content of the LinphoneBuffer.- Returns:
- A new
Bufferobject.
-
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()
-