Back to index

nordugrid-arc-nox  1.1.0~rc6
DataBuffer.java
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.36
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package nordugrid.arc;
00010 
00011 public class DataBuffer {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   protected DataBuffer(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   protected static long getCPtr(DataBuffer obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if(swigCPtr != 0 && swigCMemOwn) {
00030       swigCMemOwn = false;
00031       arcJNI.delete_DataBuffer(swigCPtr);
00032     }
00033     swigCPtr = 0;
00034   }
00035 
00036   public void setSpeed(DataSpeed value) {
00037     arcJNI.DataBuffer_speed_set(swigCPtr, this, DataSpeed.getCPtr(value), value);
00038   }
00039 
00040   public DataSpeed getSpeed() {
00041     long cPtr = arcJNI.DataBuffer_speed_get(swigCPtr, this);
00042     return (cPtr == 0) ? null : new DataSpeed(cPtr, false);
00043   }
00044 
00045   public boolean toBool() {
00046     return arcJNI.DataBuffer_toBool(swigCPtr, this);
00047   }
00048 
00049   public DataBuffer(long size, int blocks) {
00050     this(arcJNI.new_DataBuffer__SWIG_0(size, blocks), true);
00051   }
00052 
00053   public DataBuffer(long size) {
00054     this(arcJNI.new_DataBuffer__SWIG_1(size), true);
00055   }
00056 
00057   public DataBuffer() {
00058     this(arcJNI.new_DataBuffer__SWIG_2(), true);
00059   }
00060 
00061   public DataBuffer(SWIGTYPE_p_Arc__CheckSum cksum, long size, int blocks) {
00062     this(arcJNI.new_DataBuffer__SWIG_3(SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum), size, blocks), true);
00063   }
00064 
00065   public DataBuffer(SWIGTYPE_p_Arc__CheckSum cksum, long size) {
00066     this(arcJNI.new_DataBuffer__SWIG_4(SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum), size), true);
00067   }
00068 
00069   public DataBuffer(SWIGTYPE_p_Arc__CheckSum cksum) {
00070     this(arcJNI.new_DataBuffer__SWIG_5(SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum)), true);
00071   }
00072 
00073   public boolean set(SWIGTYPE_p_Arc__CheckSum cksum, long size, int blocks) {
00074     return arcJNI.DataBuffer_set__SWIG_0(swigCPtr, this, SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum), size, blocks);
00075   }
00076 
00077   public boolean set(SWIGTYPE_p_Arc__CheckSum cksum, long size) {
00078     return arcJNI.DataBuffer_set__SWIG_1(swigCPtr, this, SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum), size);
00079   }
00080 
00081   public boolean set(SWIGTYPE_p_Arc__CheckSum cksum) {
00082     return arcJNI.DataBuffer_set__SWIG_2(swigCPtr, this, SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum));
00083   }
00084 
00085   public boolean set() {
00086     return arcJNI.DataBuffer_set__SWIG_3(swigCPtr, this);
00087   }
00088 
00089   public int add(SWIGTYPE_p_Arc__CheckSum cksum) {
00090     return arcJNI.DataBuffer_add(swigCPtr, this, SWIGTYPE_p_Arc__CheckSum.getCPtr(cksum));
00091   }
00092 
00093   public boolean for_read(SWIGTYPE_p_int handle, SWIGTYPE_p_unsigned_int length, boolean wait) {
00094     return arcJNI.DataBuffer_for_read__SWIG_0(swigCPtr, this, SWIGTYPE_p_int.getCPtr(handle), SWIGTYPE_p_unsigned_int.getCPtr(length), wait);
00095   }
00096 
00097   public boolean for_read() {
00098     return arcJNI.DataBuffer_for_read__SWIG_1(swigCPtr, this);
00099   }
00100 
00101   public boolean is_read(int handle, long length, java.math.BigInteger offset) {
00102     return arcJNI.DataBuffer_is_read__SWIG_0(swigCPtr, this, handle, length, offset);
00103   }
00104 
00105   public boolean is_read(String buf, long length, java.math.BigInteger offset) {
00106     return arcJNI.DataBuffer_is_read__SWIG_1(swigCPtr, this, buf, length, offset);
00107   }
00108 
00109   public boolean for_write(SWIGTYPE_p_int handle, SWIGTYPE_p_unsigned_int length, SWIGTYPE_p_unsigned_long_long offset, boolean wait) {
00110     return arcJNI.DataBuffer_for_write__SWIG_0(swigCPtr, this, SWIGTYPE_p_int.getCPtr(handle), SWIGTYPE_p_unsigned_int.getCPtr(length), SWIGTYPE_p_unsigned_long_long.getCPtr(offset), wait);
00111   }
00112 
00113   public boolean for_write() {
00114     return arcJNI.DataBuffer_for_write__SWIG_1(swigCPtr, this);
00115   }
00116 
00117   public boolean is_written(int handle) {
00118     return arcJNI.DataBuffer_is_written__SWIG_0(swigCPtr, this, handle);
00119   }
00120 
00121   public boolean is_written(String buf) {
00122     return arcJNI.DataBuffer_is_written__SWIG_1(swigCPtr, this, buf);
00123   }
00124 
00125   public boolean is_notwritten(int handle) {
00126     return arcJNI.DataBuffer_is_notwritten__SWIG_0(swigCPtr, this, handle);
00127   }
00128 
00129   public boolean is_notwritten(String buf) {
00130     return arcJNI.DataBuffer_is_notwritten__SWIG_1(swigCPtr, this, buf);
00131   }
00132 
00133   public void eof_read(boolean v) {
00134     arcJNI.DataBuffer_eof_read__SWIG_0(swigCPtr, this, v);
00135   }
00136 
00137   public void eof_write(boolean v) {
00138     arcJNI.DataBuffer_eof_write__SWIG_0(swigCPtr, this, v);
00139   }
00140 
00141   public void error_read(boolean v) {
00142     arcJNI.DataBuffer_error_read__SWIG_0(swigCPtr, this, v);
00143   }
00144 
00145   public void error_write(boolean v) {
00146     arcJNI.DataBuffer_error_write__SWIG_0(swigCPtr, this, v);
00147   }
00148 
00149   public boolean eof_read() {
00150     return arcJNI.DataBuffer_eof_read__SWIG_1(swigCPtr, this);
00151   }
00152 
00153   public boolean eof_write() {
00154     return arcJNI.DataBuffer_eof_write__SWIG_1(swigCPtr, this);
00155   }
00156 
00157   public boolean error_read() {
00158     return arcJNI.DataBuffer_error_read__SWIG_1(swigCPtr, this);
00159   }
00160 
00161   public boolean error_write() {
00162     return arcJNI.DataBuffer_error_write__SWIG_1(swigCPtr, this);
00163   }
00164 
00165   public boolean error_transfer() {
00166     return arcJNI.DataBuffer_error_transfer(swigCPtr, this);
00167   }
00168 
00169   public boolean error() {
00170     return arcJNI.DataBuffer_error(swigCPtr, this);
00171   }
00172 
00173   public boolean wait_any() {
00174     return arcJNI.DataBuffer_wait_any(swigCPtr, this);
00175   }
00176 
00177   public boolean wait_used() {
00178     return arcJNI.DataBuffer_wait_used(swigCPtr, this);
00179   }
00180 
00181   public boolean checksum_valid() {
00182     return arcJNI.DataBuffer_checksum_valid__SWIG_0(swigCPtr, this);
00183   }
00184 
00185   public boolean checksum_valid(int index) {
00186     return arcJNI.DataBuffer_checksum_valid__SWIG_1(swigCPtr, this, index);
00187   }
00188 
00189   public SWIGTYPE_p_Arc__CheckSum checksum_object() {
00190     long cPtr = arcJNI.DataBuffer_checksum_object__SWIG_0(swigCPtr, this);
00191     return (cPtr == 0) ? null : new SWIGTYPE_p_Arc__CheckSum(cPtr, false);
00192   }
00193 
00194   public SWIGTYPE_p_Arc__CheckSum checksum_object(int index) {
00195     long cPtr = arcJNI.DataBuffer_checksum_object__SWIG_1(swigCPtr, this, index);
00196     return (cPtr == 0) ? null : new SWIGTYPE_p_Arc__CheckSum(cPtr, false);
00197   }
00198 
00199   public boolean wait_eof_read() {
00200     return arcJNI.DataBuffer_wait_eof_read(swigCPtr, this);
00201   }
00202 
00203   public boolean wait_read() {
00204     return arcJNI.DataBuffer_wait_read(swigCPtr, this);
00205   }
00206 
00207   public boolean wait_eof_write() {
00208     return arcJNI.DataBuffer_wait_eof_write(swigCPtr, this);
00209   }
00210 
00211   public boolean wait_write() {
00212     return arcJNI.DataBuffer_wait_write(swigCPtr, this);
00213   }
00214 
00215   public boolean wait_eof() {
00216     return arcJNI.DataBuffer_wait_eof(swigCPtr, this);
00217   }
00218 
00219   public java.math.BigInteger eof_position() {
00220     return arcJNI.DataBuffer_eof_position(swigCPtr, this);
00221   }
00222 
00223   public long buffer_size() {
00224     return arcJNI.DataBuffer_buffer_size(swigCPtr, this);
00225   }
00226 
00227 }