Package com.cbe.delegate
Class DownloadBinaryDelegate
java.lang.Object
com.cbe.delegate.DownloadBinaryDelegate
Delegate class for the asynchronous version of method:
- cbe::Object::download(DownloadBinaryDelegatePtr)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()voidfinalize()static longvoidonChunkReceived(Object object, long received, long total) Called when a chunk of data has been received.voidonDownloadBinaryError(TransferError transferError, Context context) Called if an error is encountered.voidonDownloadBinarySuccess(Object object, byte[] data) Called upon successful Download.voidvoidvoidswigSetCMemOwn(boolean own) void
-
Constructor Details
-
DownloadBinaryDelegate
public DownloadBinaryDelegate(long cPtr, boolean cMemoryOwn) -
DownloadBinaryDelegate
public DownloadBinaryDelegate()
-
-
Method Details
-
getCPtr
-
swigSetCMemOwn
public void swigSetCMemOwn(boolean own) -
finalize
public void finalize() -
delete
public void delete() -
swigDirectorDisconnect
public void swigDirectorDisconnect() -
swigReleaseOwnership
public void swigReleaseOwnership() -
swigTakeOwnership
public void swigTakeOwnership() -
onDownloadBinarySuccess
Called upon successful Download.- Parameters:
object- Instance of cbe::Object that is being downloaded.data- The downloaded data of the object.
The provided memory is an array of bytes (char)
dynamically allocated by the SDK, and managed by the
[<c>std::unique_ptr<c>]
(https://en.cppreference.com/w/cpp/memory/unique_ptr). So,
no further precautions needed concerning the the disposal of
this memory.
-
onDownloadBinaryError
Called if an error is encountered. -
onChunkReceived
Called when a chunk of data has been received.- Parameters:
object- Object associated with current
download.received- Size, in number of bytes, of the received chunk.total- Total number of bytes received so far.
-