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

package com.chilkatsoft;

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

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

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

  protected static long swigRelease(CkBinData 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;
        chilkatJNI.delete_CkBinData(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CkBinData() {
    this(chilkatJNI.new_CkBinData(), true);
  }

  public void LastErrorXml(CkString str) {
    chilkatJNI.CkBinData_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorHtml(CkString str) {
    chilkatJNI.CkBinData_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorText(CkString str) {
    chilkatJNI.CkBinData_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void get_DebugLogFilePath(CkString str) {
    chilkatJNI.CkBinData_get_DebugLogFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String debugLogFilePath() {
    return chilkatJNI.CkBinData_debugLogFilePath(swigCPtr, this);
  }

  public void put_DebugLogFilePath(String newVal) {
    chilkatJNI.CkBinData_put_DebugLogFilePath(swigCPtr, this, newVal);
  }

  public void get_LastErrorHtml(CkString str) {
    chilkatJNI.CkBinData_get_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorHtml() {
    return chilkatJNI.CkBinData_lastErrorHtml(swigCPtr, this);
  }

  public void get_LastErrorText(CkString str) {
    chilkatJNI.CkBinData_get_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorText() {
    return chilkatJNI.CkBinData_lastErrorText(swigCPtr, this);
  }

  public void get_LastErrorXml(CkString str) {
    chilkatJNI.CkBinData_get_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorXml() {
    return chilkatJNI.CkBinData_lastErrorXml(swigCPtr, this);
  }

  public boolean get_LastMethodSuccess() {
    return chilkatJNI.CkBinData_get_LastMethodSuccess(swigCPtr, this);
  }

  public void put_LastMethodSuccess(boolean newVal) {
    chilkatJNI.CkBinData_put_LastMethodSuccess(swigCPtr, this, newVal);
  }

  public int get_NumBytes() {
    return chilkatJNI.CkBinData_get_NumBytes(swigCPtr, this);
  }

  public boolean get_VerboseLogging() {
    return chilkatJNI.CkBinData_get_VerboseLogging(swigCPtr, this);
  }

  public void put_VerboseLogging(boolean newVal) {
    chilkatJNI.CkBinData_put_VerboseLogging(swigCPtr, this, newVal);
  }

  public void get_Version(CkString str) {
    chilkatJNI.CkBinData_get_Version(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String version() {
    return chilkatJNI.CkBinData_version(swigCPtr, this);
  }

  public boolean AppendBd(CkBinData binData) {
    return chilkatJNI.CkBinData_AppendBd(swigCPtr, this, CkBinData.getCPtr(binData), binData);
  }

  public boolean AppendBinary(CkByteData data) {
    return chilkatJNI.CkBinData_AppendBinary(swigCPtr, this, CkByteData.getCPtr(data), data);
  }

  public boolean AppendBom(String charset) {
    return chilkatJNI.CkBinData_AppendBom(swigCPtr, this, charset);
  }

  public boolean AppendByte(int byteValue) {
    return chilkatJNI.CkBinData_AppendByte(swigCPtr, this, byteValue);
  }

  public boolean AppendCountedString(int numCountBytes, boolean bigEndian, String str, String charset) {
    return chilkatJNI.CkBinData_AppendCountedString(swigCPtr, this, numCountBytes, bigEndian, str, charset);
  }

  public boolean AppendData(byte[] arr, int numBytes) {
    return chilkatJNI.CkBinData_AppendData(swigCPtr, this, arr, numBytes);
  }

  public boolean AppendEncoded(String encData, String encoding) {
    return chilkatJNI.CkBinData_AppendEncoded(swigCPtr, this, encData, encoding);
  }

  public boolean AppendEncodedSb(CkStringBuilder sb, String encoding) {
    return chilkatJNI.CkBinData_AppendEncodedSb(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, encoding);
  }

  public boolean AppendInt2(int value, boolean littleEndian) {
    return chilkatJNI.CkBinData_AppendInt2(swigCPtr, this, value, littleEndian);
  }

  public boolean AppendInt4(int value, boolean littleEndian) {
    return chilkatJNI.CkBinData_AppendInt4(swigCPtr, this, value, littleEndian);
  }

  public boolean AppendPadded(String str, String charset, boolean padWithSpace, int fieldLen) {
    return chilkatJNI.CkBinData_AppendPadded(swigCPtr, this, str, charset, padWithSpace, fieldLen);
  }

  public boolean AppendSb(CkStringBuilder sb, String charset) {
    return chilkatJNI.CkBinData_AppendSb(swigCPtr, this, CkStringBuilder.getCPtr(sb), sb, charset);
  }

  public boolean AppendString(String str, String charset) {
    return chilkatJNI.CkBinData_AppendString(swigCPtr, this, str, charset);
  }

  public void ByteSwap(int size) {
    chilkatJNI.CkBinData_ByteSwap(swigCPtr, this, size);
  }

  public boolean CharsetConvert(String fromCharset, String toCharset, boolean allOrNone) {
    return chilkatJNI.CkBinData_CharsetConvert(swigCPtr, this, fromCharset, toCharset, allOrNone);
  }

  public boolean Clear() {
    return chilkatJNI.CkBinData_Clear(swigCPtr, this);
  }

  public boolean ContentsEqual(CkBinData binData) {
    return chilkatJNI.CkBinData_ContentsEqual(swigCPtr, this, CkBinData.getCPtr(binData), binData);
  }

  public int FindString(String str, int startIdx, String charset) {
    return chilkatJNI.CkBinData_FindString(swigCPtr, this, str, startIdx, charset);
  }

  public boolean GetBinary(CkByteData outBytes) {
    return chilkatJNI.CkBinData_GetBinary(swigCPtr, this, CkByteData.getCPtr(outBytes), outBytes);
  }

  public boolean GetBinaryChunk(int offset, int numBytes, CkByteData outBytes) {
    return chilkatJNI.CkBinData_GetBinaryChunk(swigCPtr, this, offset, numBytes, CkByteData.getCPtr(outBytes), outBytes);
  }

  public int GetByte(int index) {
    return chilkatJNI.CkBinData_GetByte(swigCPtr, this, index);
  }

  public byte[] GetData() {
    return chilkatJNI.CkBinData_GetData(swigCPtr, this);
  }

  public byte[] GetDataChunk(int offset, int numBytes) {
    return chilkatJNI.CkBinData_GetDataChunk(swigCPtr, this, offset, numBytes);
  }

  public boolean GetEncoded(String encoding, CkString outStr) {
    return chilkatJNI.CkBinData_GetEncoded(swigCPtr, this, encoding, CkString.getCPtr(outStr), outStr);
  }

  public String getEncoded(String encoding) {
    return chilkatJNI.CkBinData_getEncoded(swigCPtr, this, encoding);
  }

  public String encoded(String encoding) {
    return chilkatJNI.CkBinData_encoded(swigCPtr, this, encoding);
  }

  public boolean GetEncodedChunk(int offset, int numBytes, String encoding, CkString outStr) {
    return chilkatJNI.CkBinData_GetEncodedChunk(swigCPtr, this, offset, numBytes, encoding, CkString.getCPtr(outStr), outStr);
  }

  public String getEncodedChunk(int offset, int numBytes, String encoding) {
    return chilkatJNI.CkBinData_getEncodedChunk(swigCPtr, this, offset, numBytes, encoding);
  }

  public String encodedChunk(int offset, int numBytes, String encoding) {
    return chilkatJNI.CkBinData_encodedChunk(swigCPtr, this, offset, numBytes, encoding);
  }

  public boolean GetEncodedSb(String encoding, CkStringBuilder sb) {
    return chilkatJNI.CkBinData_GetEncodedSb(swigCPtr, this, encoding, CkStringBuilder.getCPtr(sb), sb);
  }

  public boolean GetHash(String algorithm, String encoding, CkString outStr) {
    return chilkatJNI.CkBinData_GetHash(swigCPtr, this, algorithm, encoding, CkString.getCPtr(outStr), outStr);
  }

  public String getHash(String algorithm, String encoding) {
    return chilkatJNI.CkBinData_getHash(swigCPtr, this, algorithm, encoding);
  }

  public String hash(String algorithm, String encoding) {
    return chilkatJNI.CkBinData_hash(swigCPtr, this, algorithm, encoding);
  }

  public int GetInt2(int index, boolean littleEndian) {
    return chilkatJNI.CkBinData_GetInt2(swigCPtr, this, index, littleEndian);
  }

  public int GetInt4(int index, boolean littleEndian) {
    return chilkatJNI.CkBinData_GetInt4(swigCPtr, this, index, littleEndian);
  }

  public boolean GetString(String charset, CkString outStr) {
    return chilkatJNI.CkBinData_GetString(swigCPtr, this, charset, CkString.getCPtr(outStr), outStr);
  }

  public String getString(String charset) {
    return chilkatJNI.CkBinData_getString(swigCPtr, this, charset);
  }

  public String string(String charset) {
    return chilkatJNI.CkBinData_string(swigCPtr, this, charset);
  }

  public boolean GetTextChunk(int startIdx, int numBytes, String charset, CkString outStr) {
    return chilkatJNI.CkBinData_GetTextChunk(swigCPtr, this, startIdx, numBytes, charset, CkString.getCPtr(outStr), outStr);
  }

  public String getTextChunk(int startIdx, int numBytes, String charset) {
    return chilkatJNI.CkBinData_getTextChunk(swigCPtr, this, startIdx, numBytes, charset);
  }

  public String textChunk(int startIdx, int numBytes, String charset) {
    return chilkatJNI.CkBinData_textChunk(swigCPtr, this, startIdx, numBytes, charset);
  }

  public long GetUInt2(int index, boolean littleEndian) {
    return chilkatJNI.CkBinData_GetUInt2(swigCPtr, this, index, littleEndian);
  }

  public long GetUInt4(int index, boolean littleEndian) {
    return chilkatJNI.CkBinData_GetUInt4(swigCPtr, this, index, littleEndian);
  }

  public boolean IsValidUtf8() {
    return chilkatJNI.CkBinData_IsValidUtf8(swigCPtr, this);
  }

  public boolean LoadBinary(CkByteData data) {
    return chilkatJNI.CkBinData_LoadBinary(swigCPtr, this, CkByteData.getCPtr(data), data);
  }

  public boolean LoadEncoded(String encData, String encoding) {
    return chilkatJNI.CkBinData_LoadEncoded(swigCPtr, this, encData, encoding);
  }

  public boolean LoadFile(String path) {
    return chilkatJNI.CkBinData_LoadFile(swigCPtr, this, path);
  }

  public void RemoveByteVal(int value) {
    chilkatJNI.CkBinData_RemoveByteVal(swigCPtr, this, value);
  }

  public boolean RemoveChunk(int offset, int numBytes) {
    return chilkatJNI.CkBinData_RemoveChunk(swigCPtr, this, offset, numBytes);
  }

  public boolean SecureClear() {
    return chilkatJNI.CkBinData_SecureClear(swigCPtr, this);
  }

  public boolean WriteAppendFile(String path) {
    return chilkatJNI.CkBinData_WriteAppendFile(swigCPtr, this, path);
  }

  public boolean WriteFile(String path) {
    return chilkatJNI.CkBinData_WriteFile(swigCPtr, this, path);
  }

}
