All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.realm.kotlin.internal.interop.realm_binary_t Maven / Gradle / Ivy

Go to download

Wrapper for interacting with Realm Kotlin native code from the JVM. This artifact is not supposed to be consumed directly, but through 'io.realm.kotlin:gradle-plugin:3.0.0' instead.

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.2.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package io.realm.kotlin.internal.interop;

public class realm_binary_t {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected realm_binary_t(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(realm_binary_t obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected static long swigRelease(realm_binary_t obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
    delete();
}

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        realmcJNI.delete_realm_binary_t(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setData(byte[] value) {
    realmcJNI.realm_binary_t_data_set(swigCPtr, this, value);
  }

  public byte[] getData() {
    return realmcJNI.realm_binary_t_data_get(swigCPtr, this);
  }

  public void setSize(long value) {
    realmcJNI.realm_binary_t_size_set(swigCPtr, this, value);
  }

  public long getSize() {
    return realmcJNI.realm_binary_t_size_get(swigCPtr, this);
  }

  public realm_binary_t() {
    this(realmcJNI.new_realm_binary_t(), true);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy