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

package com.frostwire.jlibtorrent.swig;

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

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

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

  protected static long swigRelease(byte_array_64 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;
  }

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

  public byte_array_64() {
    this(libtorrent_jni.new_byte_array_64__SWIG_0(), true);
  }

  public byte_array_64(byte_array_64 other) {
    this(libtorrent_jni.new_byte_array_64__SWIG_1(byte_array_64.getCPtr(other), other), true);
  }

  public boolean isEmpty() {
    return libtorrent_jni.byte_array_64_isEmpty(swigCPtr, this);
  }

  public void fill(byte u) {
    libtorrent_jni.byte_array_64_fill(swigCPtr, this, u);
  }

  public int size() {
    return libtorrent_jni.byte_array_64_size(swigCPtr, this);
  }

  public byte get(int i) {
    return libtorrent_jni.byte_array_64_get(swigCPtr, this, i);
  }

  public void set(int i, byte val) {
    libtorrent_jni.byte_array_64_set(swigCPtr, this, i, val);
  }

}
