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

package pt.gov.cartaodecidadao;

public class PTEID_ByteArray extends PTEID_Object {
  private long swigCPtr;

  protected PTEID_ByteArray(long cPtr, boolean cMemoryOwn) {
    super(pteidlibJava_WrapperJNI.PTEID_ByteArray_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        pteidlibJava_WrapperJNI.delete_PTEID_ByteArray(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public PTEID_ByteArray() {
    this(pteidlibJava_WrapperJNI.new_PTEID_ByteArray__SWIG_0(), true);
  }

  public PTEID_ByteArray(PTEID_ByteArray bytearray) {
    this(pteidlibJava_WrapperJNI.new_PTEID_ByteArray__SWIG_1(PTEID_ByteArray.getCPtr(bytearray), bytearray), true);
  }

  public PTEID_ByteArray(byte[] pucData, long ulSize) {
    this(pteidlibJava_WrapperJNI.new_PTEID_ByteArray__SWIG_2(pucData, ulSize), true);
  }

  public void Append(byte[] pucData, long ulSize) {
    pteidlibJava_WrapperJNI.PTEID_ByteArray_Append__SWIG_0(swigCPtr, this, pucData, ulSize);
  }

  public void Append(PTEID_ByteArray data) {
    pteidlibJava_WrapperJNI.PTEID_ByteArray_Append__SWIG_1(swigCPtr, this, PTEID_ByteArray.getCPtr(data), data);
  }

  public void Clear() {
    pteidlibJava_WrapperJNI.PTEID_ByteArray_Clear(swigCPtr, this);
  }

  public boolean Equals(PTEID_ByteArray data) {
    return pteidlibJava_WrapperJNI.PTEID_ByteArray_Equals(swigCPtr, this, PTEID_ByteArray.getCPtr(data), data);
  }

  public long Size() {
    return pteidlibJava_WrapperJNI.PTEID_ByteArray_Size(swigCPtr, this);
  }

  public byte[] GetBytes() {
return pteidlibJava_WrapperJNI.PTEID_ByteArray_GetBytes(swigCPtr, this);
}

  public boolean writeToFile(String csFilePath) {
    return pteidlibJava_WrapperJNI.PTEID_ByteArray_writeToFile(swigCPtr, this, csFilePath);
  }

  public PTEID_ByteArray assign(PTEID_ByteArray bytearray) {
    return new PTEID_ByteArray(pteidlibJava_WrapperJNI.PTEID_ByteArray_assign(swigCPtr, this, PTEID_ByteArray.getCPtr(bytearray), bytearray), false);
  }

}
