Package org.linphone.core
Interface Buffer
public interface Buffer
The object representing a data buffer.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets the content of the data buffer.longGets the native pointer used by this class to make native method calls.intgetSize()Gets the size of the content of the data buffer.Gets 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) Creates a newBufferobject from existing data.newFromString(String data) Creates a newBufferobject from a string.voidsetContent(byte[] content, int size) Sets the content of the data buffer.voidsetSize(int size) Sets the size of the content of the data buffer.voidsetStringContent(String content) Sets 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()Gets 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()Gets the size of the content of the data buffer.
- Returns:
- The size of the content of the data buffer.
-
setSize
void setSize(int size) Sets the size of the content of the data buffer.
- Parameters:
size- The size of the content of the data buffer.
-
getStringContent
Gets the string content of the data buffer.
- Returns:
- The string content of the data buffer.
-
setStringContent
Sets the string content of the data buffer.
- Parameters:
content- The string content of the data buffer.
-
setContent
void setContent(@NonNull byte[] content, int size) Sets 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()
-