![JAR search and dependency download from the Maven repository](/logo.png)
org.libtorrent4j.swig.bitfield Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libtorrent4j Show documentation
Show all versions of libtorrent4j Show documentation
A swig Java interface for libtorrent
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.libtorrent4j.swig;
public class bitfield {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected bitfield(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(bitfield obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libtorrent_jni.delete_bitfield(swigCPtr);
}
swigCPtr = 0;
}
}
public bitfield() {
this(libtorrent_jni.new_bitfield__SWIG_0(), true);
}
public bitfield(int bits) {
this(libtorrent_jni.new_bitfield__SWIG_1(bits), true);
}
public bitfield(int bits, boolean val) {
this(libtorrent_jni.new_bitfield__SWIG_2(bits, val), true);
}
public bitfield(bitfield rhs) {
this(libtorrent_jni.new_bitfield__SWIG_3(bitfield.getCPtr(rhs), rhs), true);
}
public boolean at(int index) {
return libtorrent_jni.bitfield_at(swigCPtr, this, index);
}
public boolean get_bit(int index) {
return libtorrent_jni.bitfield_get_bit(swigCPtr, this, index);
}
public void clear_bit(int index) {
libtorrent_jni.bitfield_clear_bit(swigCPtr, this, index);
}
public void set_bit(int index) {
libtorrent_jni.bitfield_set_bit(swigCPtr, this, index);
}
public boolean all_set() {
return libtorrent_jni.bitfield_all_set(swigCPtr, this);
}
public boolean none_set() {
return libtorrent_jni.bitfield_none_set(swigCPtr, this);
}
public int size() {
return libtorrent_jni.bitfield_size(swigCPtr, this);
}
public int num_words() {
return libtorrent_jni.bitfield_num_words(swigCPtr, this);
}
public boolean empty() {
return libtorrent_jni.bitfield_empty(swigCPtr, this);
}
public void swap(bitfield rhs) {
libtorrent_jni.bitfield_swap(swigCPtr, this, bitfield.getCPtr(rhs), rhs);
}
public int count() {
return libtorrent_jni.bitfield_count(swigCPtr, this);
}
public int find_first_set() {
return libtorrent_jni.bitfield_find_first_set(swigCPtr, this);
}
public int find_last_clear() {
return libtorrent_jni.bitfield_find_last_clear(swigCPtr, this);
}
public void resize(int bits, boolean val) {
libtorrent_jni.bitfield_resize__SWIG_0(swigCPtr, this, bits, val);
}
public void resize(int bits) {
libtorrent_jni.bitfield_resize__SWIG_1(swigCPtr, this, bits);
}
public void set_all() {
libtorrent_jni.bitfield_set_all(swigCPtr, this);
}
public void clear_all() {
libtorrent_jni.bitfield_clear_all(swigCPtr, this);
}
public void clear() {
libtorrent_jni.bitfield_clear(swigCPtr, this);
}
public bitfield(byte_vector v) {
this(libtorrent_jni.new_bitfield__SWIG_4(byte_vector.getCPtr(v), v), true);
}
public void assign(byte_vector v) {
libtorrent_jni.bitfield_assign(swigCPtr, this, byte_vector.getCPtr(v), v);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy