Class DownloadBinaryDelegate

java.lang.Object
com.cbe.delegate.DownloadBinaryDelegate

public class DownloadBinaryDelegate extends Object
Delegate class for the asynchronous version of method:

  • cbe::Object::download(DownloadBinaryDelegatePtr)
  • Constructor Details

    • DownloadBinaryDelegate

      public DownloadBinaryDelegate(long cPtr, boolean cMemoryOwn)
    • DownloadBinaryDelegate

      public DownloadBinaryDelegate()
  • Method Details

    • getCPtr

      public static long getCPtr(DownloadBinaryDelegate obj)
    • swigSetCMemOwn

      public void swigSetCMemOwn(boolean own)
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • swigDirectorDisconnect

      public void swigDirectorDisconnect()
    • swigReleaseOwnership

      public void swigReleaseOwnership()
    • swigTakeOwnership

      public void swigTakeOwnership()
    • onDownloadBinarySuccess

      public void onDownloadBinarySuccess(Object object, byte[] data)
      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

      public void onDownloadBinaryError(TransferError transferError, Context context)
      Called if an error is encountered.
    • onChunkReceived

      public void onChunkReceived(Object object, long received, long total)
      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.