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


#define SWIG_VERSION 0x040101
#define SWIGJAVA

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif


#include <jni.h>
#include <stdlib.h>
#include <string.h>


/* Support for throwing Java exceptions */
typedef enum {
  SWIG_JavaOutOfMemoryError = 1,
  SWIG_JavaIOException,
  SWIG_JavaRuntimeException,
  SWIG_JavaIndexOutOfBoundsException,
  SWIG_JavaArithmeticException,
  SWIG_JavaIllegalArgumentException,
  SWIG_JavaNullPointerException,
  SWIG_JavaDirectorPureVirtual,
  SWIG_JavaUnknownError,
  SWIG_JavaIllegalStateException,
} SWIG_JavaExceptionCodes;

typedef struct {
  SWIG_JavaExceptionCodes code;
  const char *java_exception;
} SWIG_JavaExceptions_t;


static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  jclass excep;
  static const SWIG_JavaExceptions_t java_exceptions[] = {
    { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
    { SWIG_JavaIOException, "java/io/IOException" },
    { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
    { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
    { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
    { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
    { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
    { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
    { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
    { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
    { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" }
  };
  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;

  while (except_ptr->code != code && except_ptr->code)
    except_ptr++;

  (*jenv)->ExceptionClear(jenv);
  excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
  if (excep)
    (*jenv)->ThrowNew(jenv, excep, msg);
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0)


#if defined(SWIG_NOINCLUDE) || defined(SWIG_NOARRAYS)


static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input);
static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input);
static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz);


static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input);
static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input);
static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz);


static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input);
static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input);
static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz);


static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input);
static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input);
static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz);


static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input);
static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input);
static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz);


static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input);
static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input);
static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz);


static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input);
static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input);
static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz);


static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input);
static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input);
static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz);


static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, long long **carr, jlongArray input);
static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, long long *carr, jlongArray input);
static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, long long *result, jsize sz);


static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input);
static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input);
static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz);


static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input);
static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input);
static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz);


#else


/* signed char[] support */
static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetByteArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (signed char*) malloc(sz * sizeof(signed char)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (signed char)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jbyte)carr[i];
  (*jenv)->ReleaseByteArrayElements(jenv, input, jarr, 0);
}

static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz) {
  jbyte *arr;
  int i;
  jbyteArray jresult = (*jenv)->NewByteArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetByteArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jbyte)result[i];
  (*jenv)->ReleaseByteArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* unsigned char[] support */
static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetShortArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (unsigned char*) malloc(sz * sizeof(unsigned char)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (unsigned char)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jshort)carr[i];
  (*jenv)->ReleaseShortArrayElements(jenv, input, jarr, 0);
}

static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz) {
  jshort *arr;
  int i;
  jshortArray jresult = (*jenv)->NewShortArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetShortArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jshort)result[i];
  (*jenv)->ReleaseShortArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* short[] support */
static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetShortArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (short*) malloc(sz * sizeof(short)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (short)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jshort)carr[i];
  (*jenv)->ReleaseShortArrayElements(jenv, input, jarr, 0);
}

static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz) {
  jshort *arr;
  int i;
  jshortArray jresult = (*jenv)->NewShortArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetShortArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jshort)result[i];
  (*jenv)->ReleaseShortArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* unsigned short[] support */
static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetIntArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (unsigned short*) malloc(sz * sizeof(unsigned short)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (unsigned short)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jint)carr[i];
  (*jenv)->ReleaseIntArrayElements(jenv, input, jarr, 0);
}

static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz) {
  jint *arr;
  int i;
  jintArray jresult = (*jenv)->NewIntArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetIntArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jint)result[i];
  (*jenv)->ReleaseIntArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* int[] support */
static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetIntArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (int*) malloc(sz * sizeof(int)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (int)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jint)carr[i];
  (*jenv)->ReleaseIntArrayElements(jenv, input, jarr, 0);
}

static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz) {
  jint *arr;
  int i;
  jintArray jresult = (*jenv)->NewIntArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetIntArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jint)result[i];
  (*jenv)->ReleaseIntArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* unsigned int[] support */
static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetLongArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (unsigned int*) malloc(sz * sizeof(unsigned int)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (unsigned int)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jlong)carr[i];
  (*jenv)->ReleaseLongArrayElements(jenv, input, jarr, 0);
}

static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz) {
  jlong *arr;
  int i;
  jlongArray jresult = (*jenv)->NewLongArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetLongArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jlong)result[i];
  (*jenv)->ReleaseLongArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* long[] support */
static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetIntArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (long*) malloc(sz * sizeof(long)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (long)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jint)carr[i];
  (*jenv)->ReleaseIntArrayElements(jenv, input, jarr, 0);
}

static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz) {
  jint *arr;
  int i;
  jintArray jresult = (*jenv)->NewIntArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetIntArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jint)result[i];
  (*jenv)->ReleaseIntArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* unsigned long[] support */
static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetLongArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (unsigned long*) malloc(sz * sizeof(unsigned long)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (unsigned long)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jlong)carr[i];
  (*jenv)->ReleaseLongArrayElements(jenv, input, jarr, 0);
}

static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz) {
  jlong *arr;
  int i;
  jlongArray jresult = (*jenv)->NewLongArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetLongArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jlong)result[i];
  (*jenv)->ReleaseLongArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* long long[] support */
static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, long long **carr, jlongArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetLongArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (long long*) malloc(sz * sizeof(long long)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (long long)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, long long *carr, jlongArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jlong)carr[i];
  (*jenv)->ReleaseLongArrayElements(jenv, input, jarr, 0);
}

static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, long long *result, jsize sz) {
  jlong *arr;
  int i;
  jlongArray jresult = (*jenv)->NewLongArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetLongArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jlong)result[i];
  (*jenv)->ReleaseLongArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* float[] support */
static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetFloatArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (float*) malloc(sz * sizeof(float)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (float)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jfloat)carr[i];
  (*jenv)->ReleaseFloatArrayElements(jenv, input, jarr, 0);
}

static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz) {
  jfloat *arr;
  int i;
  jfloatArray jresult = (*jenv)->NewFloatArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetFloatArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jfloat)result[i];
  (*jenv)->ReleaseFloatArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


/* double[] support */
static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input) {
  int i;
  jsize sz;
  if (!input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
    return 0;
  }
  sz = (*jenv)->GetArrayLength(jenv, input);
  *jarr = (*jenv)->GetDoubleArrayElements(jenv, input, 0);
  if (!*jarr)
    return 0; 
  *carr = (double*) malloc(sz * sizeof(double)); 
  if (!*carr) {
    SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
    return 0;
  }
  for (i=0; i<sz; i++)
    (*carr)[i] = (double)(*jarr)[i];
  return 1;
}

static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input) {
  int i;
  jsize sz = (*jenv)->GetArrayLength(jenv, input);
  for (i=0; i<sz; i++)
    jarr[i] = (jdouble)carr[i];
  (*jenv)->ReleaseDoubleArrayElements(jenv, input, jarr, 0);
}

static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz) {
  jdouble *arr;
  int i;
  jdoubleArray jresult = (*jenv)->NewDoubleArray(jenv, sz);
  if (!jresult)
    return NULL;
  arr = (*jenv)->GetDoubleArrayElements(jenv, jresult, 0);
  if (!arr)
    return NULL;
  for (i=0; i<sz; i++)
    arr[i] = (jdouble)result[i];
  (*jenv)->ReleaseDoubleArrayElements(jenv, jresult, arr, 0);
  return jresult;
}


#endif


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "coda.h"


    static const char *helper_version(void)
    {
        return libcoda_version;
    }


    coda_cursor *new_coda_cursor(void)
    {
        return (coda_cursor *)malloc(sizeof(coda_cursor));
    }

    void delete_coda_cursor(coda_cursor *self)
    {
        free(self);
    }

    coda_cursor *deepcopy_coda_cursor(coda_cursor *self)
    {
        coda_cursor *new_cursor;

        new_cursor = (coda_cursor *)malloc(sizeof(coda_cursor));
        if( new_cursor != NULL )
        {
            memcpy(new_cursor, self, sizeof(coda_cursor));
        }
        return new_cursor;
    }



    char *helper_coda_cursor_read_string(const coda_cursor *cursor)
    {
        long dst_size;
        char *dst;
        
        coda_cursor_get_string_length(cursor, &dst_size);
        dst = (char *)malloc(dst_size+1);
        coda_cursor_read_string(cursor, dst, dst_size+1);
        return dst;
    }


    char *helper_coda_time_parts_to_string(int year, int month, int day, int hour, int minute, int second, int musec,
                                           const char *format)
    {
        char *dst = (char *)malloc(strlen(format) + 1);
        coda_time_parts_to_string(year, month, day, hour, minute, second, musec, format, dst);
        return dst;
    }


    char *helper_coda_time_double_to_string(double datetime, const char *format)
    {
        char *dst = (char *)malloc(strlen(format) + 1);
        coda_time_double_to_string(datetime, format, dst);
        return dst;
    }


    char *helper_coda_time_double_to_string_utc(double datetime, const char *format)
    {
        char *dst = (char *)malloc(strlen(format) + 1);
        coda_time_double_to_string_utc(datetime, format, dst);
        return dst;
    }


    char *helper_coda_time_to_string(double datetime)
    {
        char *dst = (char *)malloc(27);
        coda_time_to_string(datetime, dst);
        return dst;
    }


    char *helper_coda_time_to_utcstring(double datetime)
    {
        char *dst = (char *)malloc(27);
        coda_time_to_utcstring(datetime, dst);
        return dst;
    }


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1version(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)helper_version();
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_nl_stcorp_coda_codacJNI_new_1coda_1cursor(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  coda_cursor *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (coda_cursor *)new_coda_cursor();
  *(coda_cursor **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_nl_stcorp_coda_codacJNI_delete_1coda_1cursor(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  delete_coda_cursor(arg1);
}


SWIGEXPORT jlong JNICALL Java_nl_stcorp_coda_codacJNI_deepcopy_1coda_1cursor(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_cursor *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  result = (coda_cursor *)deepcopy_coda_cursor(arg1);
  *(coda_cursor **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1cursor_1read_1string(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jstring jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  result = (char *)helper_coda_cursor_read_string((struct coda_cursor_struct const *)arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  free(result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1time_1parts_1to_1string(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jstring jarg8) {
  jstring jresult = 0 ;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  char *arg8 = (char *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  arg8 = 0;
  if (jarg8) {
    arg8 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg8, 0);
    if (!arg8) return 0;
  }
  result = (char *)helper_coda_time_parts_to_string(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(char const *)arg8);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  if (arg8) (*jenv)->ReleaseStringUTFChars(jenv, jarg8, (const char *)arg8);
  free(result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1time_1double_1to_1string(JNIEnv *jenv, jclass jcls, jdouble jarg1, jstring jarg2) {
  jstring jresult = 0 ;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  result = (char *)helper_coda_time_double_to_string(arg1,(char const *)arg2);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  free(result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1time_1double_1to_1string_1utc(JNIEnv *jenv, jclass jcls, jdouble jarg1, jstring jarg2) {
  jstring jresult = 0 ;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  result = (char *)helper_coda_time_double_to_string_utc(arg1,(char const *)arg2);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  free(result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1time_1to_1string(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jstring jresult = 0 ;
  double arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (char *)helper_coda_time_to_string(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  free(result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_helper_1coda_1time_1to_1utcstring(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jstring jresult = 0 ;
  double arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (char *)helper_coda_time_to_utcstring(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  free(result);
  return jresult;
}


SWIGEXPORT void JNICALL Java_nl_stcorp_coda_codacJNI_done(JNIEnv *jenv, jclass jcls) {
  (void)jenv;
  (void)jcls;
  coda_done();
}


SWIGEXPORT jdouble JNICALL Java_nl_stcorp_coda_codacJNI_NaN(JNIEnv *jenv, jclass jcls) {
  jdouble jresult = 0 ;
  double result;
  
  (void)jenv;
  (void)jcls;
  result = (double)coda_NaN();
  jresult = (jdouble)result; 
  return jresult;
}


SWIGEXPORT jdouble JNICALL Java_nl_stcorp_coda_codacJNI_PlusInf(JNIEnv *jenv, jclass jcls) {
  jdouble jresult = 0 ;
  double result;
  
  (void)jenv;
  (void)jcls;
  result = (double)coda_PlusInf();
  jresult = (jdouble)result; 
  return jresult;
}


SWIGEXPORT jdouble JNICALL Java_nl_stcorp_coda_codacJNI_MinInf(JNIEnv *jenv, jclass jcls) {
  jdouble jresult = 0 ;
  double result;
  
  (void)jenv;
  (void)jcls;
  result = (double)coda_MinInf();
  jresult = (jdouble)result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1format_1name(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jstring jresult = 0 ;
  coda_format arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (coda_format)jarg1; 
  result = (char *)coda_type_get_format_name(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1class_1name(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jstring jresult = 0 ;
  coda_type_class arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (coda_type_class)jarg1; 
  result = (char *)coda_type_get_class_name(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1native_1type_1name(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jstring jresult = 0 ;
  coda_native_type arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (coda_native_type)jarg1; 
  result = (char *)coda_type_get_native_type_name(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1special_1type_1name(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jstring jresult = 0 ;
  coda_special_type arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (coda_special_type)jarg1; 
  result = (char *)coda_type_get_special_type_name(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_nl_stcorp_coda_codacJNI_expression_1get_1type_1name(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jstring jresult = 0 ;
  coda_expression_type arg1 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (coda_expression_type)jarg1; 
  result = (char *)coda_expression_get_type_name(arg1);
  if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
  return jresult;
}


SWIGEXPORT void JNICALL Java_nl_stcorp_coda_codacJNI_expression_1delete(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  coda_expression *arg1 = (coda_expression *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  coda_expression_delete(arg1);
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1option_1bypass_1special_1types(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)coda_get_option_bypass_special_types();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1option_1perform_1boundary_1checks(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)coda_get_option_perform_boundary_checks();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1option_1perform_1conversions(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)coda_get_option_perform_conversions();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1option_1use_1fast_1size_1expressions(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)coda_get_option_use_fast_size_expressions();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1option_1use_1mmap(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)coda_get_option_use_mmap();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_isNaN(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jint jresult = 0 ;
  double arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (int)coda_isNaN(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_isInf(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jint jresult = 0 ;
  double arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (int)coda_isInf(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_isPlusInf(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jint jresult = 0 ;
  double arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (int)coda_isPlusInf(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_isMinInf(JNIEnv *jenv, jclass jcls, jdouble jarg1) {
  jint jresult = 0 ;
  double arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  result = (int)coda_isMinInf(arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1is_1constant(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  result = (int)coda_expression_is_constant((struct coda_expression_struct const *)arg1);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1is_1equal(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_expression *arg2 = (coda_expression *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_expression **)&jarg2; 
  result = (int)coda_expression_is_equal((struct coda_expression_struct const *)arg1,(struct coda_expression_struct const *)arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1double(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  double temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (double)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_read_double((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_double");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_double(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp2;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint64(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint64_t *arg2 = (uint64_t *) 0 ;
  uint64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (uint64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_read_uint64((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint64");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint64(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1char(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *arg2 = (char *) 0 ;
  char temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (char)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_read_char((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_char");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_char(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jbyte jvalue = (jbyte)temp2;
    (*jenv)->SetByteArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1char_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *arg2 = (char *) 0 ;
  coda_array_ordering arg3 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_char_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_char_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_char_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1char_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jbyteArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  char *arg4 = (char *) 0 ;
  jbyte *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr4, (signed char **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_char_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_char_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_char_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr4, (signed char *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_init(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  {
    result = (int)coda_init();
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_init");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_init(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1definition_1path(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  {
    result = (int)coda_set_definition_path((char const *)arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_definition_path");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_definition_path(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1definition_1path_1conditional(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0);
    if (!arg3) return 0;
  }
  {
    result = (int)coda_set_definition_path_conditional((char const *)arg1,(char const *)arg2,(char const *)arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_definition_path_conditional");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_definition_path_conditional(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1option_1bypass_1special_1types(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  {
    result = (int)coda_set_option_bypass_special_types(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_option_bypass_special_types");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_option_bypass_special_types(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1option_1perform_1boundary_1checks(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  {
    result = (int)coda_set_option_perform_boundary_checks(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_option_perform_boundary_checks");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_option_perform_boundary_checks(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1option_1perform_1conversions(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  {
    result = (int)coda_set_option_perform_conversions(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_option_perform_conversions");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_option_perform_conversions(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1option_1use_1fast_1size_1expressions(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  {
    result = (int)coda_set_option_use_fast_size_expressions(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_option_use_fast_size_expressions");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_option_use_fast_size_expressions(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_set_1option_1use_1mmap(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jint jresult = 0 ;
  int arg1 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  {
    result = (int)coda_set_option_use_mmap(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_set_option_use_mmap");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_set_option_use_mmap(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_c_1index_1to_1fortran_1index(JNIEnv *jenv, jclass jcls, jint jarg1, jintArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  int arg1 ;
  long *arg2 ;
  long arg3 ;
  jint *jarr2 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  if (!SWIG_JavaArrayInLong(jenv, &jarr2, (long **)&arg2, jarg2)) return 0; 
  arg3 = (long)jarg3; 
  {
    result = (long)coda_c_index_to_fortran_index(arg1,(long const (*))arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_c_index_to_fortran_index");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_c_index_to_fortran_index(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  jresult = (jint)result; 
  SWIG_JavaArrayArgoutLong(jenv, jarr2, (long *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1double_1to_1parts(JNIEnv *jenv, jclass jcls, jdouble jarg1, jintArray jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8) {
  jint jresult = 0 ;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int temp2 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int)0;
    arg4 = &temp4; 
  }
  {
    if (!jarg5) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp5 = (int)0;
    arg5 = &temp5; 
  }
  {
    if (!jarg6) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg6) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp6 = (int)0;
    arg6 = &temp6; 
  }
  {
    if (!jarg7) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg7) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp7 = (int)0;
    arg7 = &temp7; 
  }
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (int)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_time_double_to_parts(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_double_to_parts");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_double_to_parts(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp5;
    (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp6;
    (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp7;
    (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp8;
    (*jenv)->SetIntArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  
  
  
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1double_1to_1parts_1utc(JNIEnv *jenv, jclass jcls, jdouble jarg1, jintArray jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8) {
  jint jresult = 0 ;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int temp2 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int)0;
    arg4 = &temp4; 
  }
  {
    if (!jarg5) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp5 = (int)0;
    arg5 = &temp5; 
  }
  {
    if (!jarg6) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg6) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp6 = (int)0;
    arg6 = &temp6; 
  }
  {
    if (!jarg7) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg7) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp7 = (int)0;
    arg7 = &temp7; 
  }
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (int)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_time_double_to_parts_utc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_double_to_parts_utc");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_double_to_parts_utc(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp5;
    (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp6;
    (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp7;
    (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp8;
    (*jenv)->SetIntArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  
  
  
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1parts_1to_1double(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jdoubleArray jarg8) {
  jint jresult = 0 ;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  double *arg8 = (double *) 0 ;
  double temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (double)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_time_parts_to_double(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_parts_to_double");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_parts_to_double(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp8;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1parts_1to_1double_1utc(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jdoubleArray jarg8) {
  jint jresult = 0 ;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  double *arg8 = (double *) 0 ;
  double temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (double)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_time_parts_to_double_utc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_parts_to_double_utc");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_parts_to_double_utc(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp8;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1string_1to_1parts(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8, jintArray jarg9) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int *arg9 = (int *) 0 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int temp9 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int)0;
    arg4 = &temp4; 
  }
  {
    if (!jarg5) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp5 = (int)0;
    arg5 = &temp5; 
  }
  {
    if (!jarg6) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg6) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp6 = (int)0;
    arg6 = &temp6; 
  }
  {
    if (!jarg7) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg7) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp7 = (int)0;
    arg7 = &temp7; 
  }
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (int)0;
    arg8 = &temp8; 
  }
  {
    if (!jarg9) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg9) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp9 = (int)0;
    arg9 = &temp9; 
  }
  {
    result = (int)coda_time_string_to_parts((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_string_to_parts");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_string_to_parts(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp5;
    (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp6;
    (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp7;
    (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp8;
    (*jenv)->SetIntArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp9;
    (*jenv)->SetIntArrayRegion(jenv, jarg9, 0, 1, &jvalue);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  
  
  
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1string_1to_1double(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jdoubleArray jarg3) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  double *arg3 = (double *) 0 ;
  double temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (double)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_time_string_to_double((char const *)arg1,(char const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_string_to_double");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_string_to_double(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp3;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_time_1string_1to_1double_1utc(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jdoubleArray jarg3) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  double *arg3 = (double *) 0 ;
  double temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (double)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_time_string_to_double_utc((char const *)arg1,(char const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_time_string_to_double_utc");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_time_string_to_double_utc(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp3;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_datetime_1to_1double(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jdoubleArray jarg8) {
  jint jresult = 0 ;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  double *arg8 = (double *) 0 ;
  double temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (double)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_datetime_to_double(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_datetime_to_double");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_datetime_to_double(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp8;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_double_1to_1datetime(JNIEnv *jenv, jclass jcls, jdouble jarg1, jintArray jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8) {
  jint jresult = 0 ;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int temp2 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int)0;
    arg4 = &temp4; 
  }
  {
    if (!jarg5) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp5 = (int)0;
    arg5 = &temp5; 
  }
  {
    if (!jarg6) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg6) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp6 = (int)0;
    arg6 = &temp6; 
  }
  {
    if (!jarg7) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg7) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp7 = (int)0;
    arg7 = &temp7; 
  }
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (int)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_double_to_datetime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_double_to_datetime");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_double_to_datetime(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp5;
    (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp6;
    (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp7;
    (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp8;
    (*jenv)->SetIntArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  
  
  
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_string_1to_1time(JNIEnv *jenv, jclass jcls, jstring jarg1, jdoubleArray jarg2) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  double *arg2 = (double *) 0 ;
  double temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (double)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_string_to_time((char const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_string_to_time");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_string_to_time(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp2;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_utcdatetime_1to_1double(JNIEnv *jenv, jclass jcls, jint jarg1, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jdoubleArray jarg8) {
  jint jresult = 0 ;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  double *arg8 = (double *) 0 ;
  double temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (int)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (double)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_utcdatetime_to_double(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_utcdatetime_to_double");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_utcdatetime_to_double(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp8;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_double_1to_1utcdatetime(JNIEnv *jenv, jclass jcls, jdouble jarg1, jintArray jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8) {
  jint jresult = 0 ;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int temp2 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = (double)jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int)0;
    arg4 = &temp4; 
  }
  {
    if (!jarg5) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp5 = (int)0;
    arg5 = &temp5; 
  }
  {
    if (!jarg6) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg6) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp6 = (int)0;
    arg6 = &temp6; 
  }
  {
    if (!jarg7) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg7) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp7 = (int)0;
    arg7 = &temp7; 
  }
  {
    if (!jarg8) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg8) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp8 = (int)0;
    arg8 = &temp8; 
  }
  {
    result = (int)coda_double_to_utcdatetime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_double_to_utcdatetime");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_double_to_utcdatetime(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp5;
    (*jenv)->SetIntArrayRegion(jenv, jarg5, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp6;
    (*jenv)->SetIntArrayRegion(jenv, jarg6, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp7;
    (*jenv)->SetIntArrayRegion(jenv, jarg7, 0, 1, &jvalue);
  }
  {
    jint jvalue = (jint)temp8;
    (*jenv)->SetIntArrayRegion(jenv, jarg8, 0, 1, &jvalue);
  }
  
  
  
  
  
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_utcstring_1to_1time(JNIEnv *jenv, jclass jcls, jstring jarg1, jdoubleArray jarg2) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  double *arg2 = (double *) 0 ;
  double temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (double)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_utcstring_to_time((char const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_utcstring_to_time");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_utcstring_to_time(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp2;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_open(JNIEnv *jenv, jclass jcls, jstring jarg1, jobject jarg2) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  coda_product **arg2 = (coda_product **) 0 ;
  coda_product *ppcoda_product2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  
  arg2 = &ppcoda_product2;
  
  {
    result = (int)coda_open((char const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_open");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_open(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_product_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_product **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_open_1as(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jint jarg4, jobject jarg5) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  coda_product **arg5 = (coda_product **) 0 ;
  coda_product *ppcoda_product5 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0);
    if (!arg3) return 0;
  }
  arg4 = (int)jarg4; 
  
  arg5 = &ppcoda_product5;
  
  {
    result = (int)coda_open_as((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_open_as");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_open_as(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_product_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_product **)&cPtr = *arg5;
    (*jenv)->SetLongField(jenv, jarg5, fid, cPtr);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_close(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    result = (int)coda_close(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_close");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_close(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1filename(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_get_product_filename((struct coda_product_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_filename");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_filename(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1file_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_get_product_file_size((struct coda_product_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_file_size");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_file_size(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1format(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  coda_format *arg2 = (coda_format *) 0 ;
  coda_format temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_format)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_get_product_format((struct coda_product_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_format");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_format(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1class(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_get_product_class((struct coda_product_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_class");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_class(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_get_product_type((struct coda_product_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1version(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_get_product_version((struct coda_product_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_version");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_version(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1definition_1file(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_get_product_definition_file((struct coda_product_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_definition_file");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_definition_file(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1root_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  coda_type **arg2 = (coda_type **) 0 ;
  coda_type *ppcoda_type2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  
  arg2 = &ppcoda_type2;
  
  {
    result = (int)coda_get_product_root_type((struct coda_product_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_root_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_root_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_get_1product_1variable_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jlongArray jarg4) {
  jint jresult = 0 ;
  coda_product *arg1 = (coda_product *) 0 ;
  char *arg2 = (char *) 0 ;
  long arg3 ;
  int64_t *arg4 = (int64_t *) 0 ;
  int64_t temp4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_product **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (long)jarg3; 
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (int64_t)0;
    arg4 = &temp4; 
  }
  {
    result = (int)coda_get_product_variable_value(arg1,(char const *)arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_get_product_variable_value");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_get_product_variable_value(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp4;
    (*jenv)->SetLongArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1has_1attributes(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_has_attributes((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_has_attributes");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_has_attributes(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1format(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_format *arg2 = (coda_format *) 0 ;
  coda_format temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_format)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_format((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_format");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_format(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1class(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_type_class *arg2 = (coda_type_class *) 0 ;
  coda_type_class temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_type_class)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_class((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_class");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_class(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1read_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_native_type *arg2 = (coda_native_type *) 0 ;
  coda_native_type temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_native_type)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_read_type((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_read_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_read_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1string_1length(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_string_length((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_string_length");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_string_length(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1bit_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_bit_size((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_bit_size");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_bit_size(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_type_get_name((struct coda_type_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1description(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_type_get_description((struct coda_type_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_description");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_description(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1unit(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char **arg2 = (char **) 0 ;
  char *temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    result = (int)coda_type_get_unit((struct coda_type_struct const *)arg1,(char const **)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_unit");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_unit(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1fixed_1value(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char **arg2 = (char **) 0 ;
  long *arg3 = (long *) 0 ;
  char *temp2 ;
  long temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg2 = &temp2; 
    *arg2 = 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (long)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_type_get_fixed_value((struct coda_type_struct const *)arg1,(char const **)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_fixed_value");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_fixed_value(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg2) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg2);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg2, 0, jnewstring); 
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1attributes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_type **arg2 = (coda_type **) 0 ;
  coda_type *ppcoda_type2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  
  arg2 = &ppcoda_type2;
  
  {
    result = (int)coda_type_get_attributes((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_attributes");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_attributes(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1num_1record_1fields(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_num_record_fields((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_num_record_fields");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_num_record_fields(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1index_1from_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char *arg2 = (char *) 0 ;
  long *arg3 = (long *) 0 ;
  long temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (long)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_type_get_record_field_index_from_name((struct coda_type_struct const *)arg1,(char const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_index_from_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_index_from_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1index_1from_1real_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  char *arg2 = (char *) 0 ;
  long *arg3 = (long *) 0 ;
  long temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (long)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_type_get_record_field_index_from_real_name((struct coda_type_struct const *)arg1,(char const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_index_from_real_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_index_from_real_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jobject jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long arg2 ;
  coda_type **arg3 = (coda_type **) 0 ;
  coda_type *ppcoda_type3 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = (long)jarg2; 
  
  arg3 = &ppcoda_type3;
  
  {
    result = (int)coda_type_get_record_field_type((struct coda_type_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg3;
    (*jenv)->SetLongField(jenv, jarg3, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jobjectArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long arg2 ;
  char **arg3 = (char **) 0 ;
  char *temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg3 = &temp3; 
    *arg3 = 0;
  }
  {
    result = (int)coda_type_get_record_field_name((struct coda_type_struct const *)arg1,arg2,(char const **)arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg3) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg3);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg3, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1real_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jobjectArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long arg2 ;
  char **arg3 = (char **) 0 ;
  char *temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg3 = &temp3; 
    *arg3 = 0;
  }
  {
    result = (int)coda_type_get_record_field_real_name((struct coda_type_struct const *)arg1,arg2,(char const **)arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_real_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_real_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg3) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg3);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg3, 0, jnewstring); 
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1hidden_1status(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long arg2 ;
  int *arg3 = (int *) 0 ;
  int temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_type_get_record_field_hidden_status((struct coda_type_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_hidden_status");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_hidden_status(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1field_1available_1status(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  long arg2 ;
  int *arg3 = (int *) 0 ;
  int temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_type_get_record_field_available_status((struct coda_type_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_field_available_status");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_field_available_status(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1record_1union_1status(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_record_union_status((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_record_union_status");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_record_union_status(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1array_1num_1dims(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_array_num_dims((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_array_num_dims");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_array_num_dims(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1array_1dim(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  int *arg2 = (int *) 0 ;
  long *arg3 ;
  int temp2 ;
  jint *jarr3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  if (!SWIG_JavaArrayInLong(jenv, &jarr3, (long **)&arg3, jarg3)) return 0; 
  {
    result = (int)coda_type_get_array_dim((struct coda_type_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_array_dim");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_array_dim(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  SWIG_JavaArrayArgoutLong(jenv, jarr3, (long *)arg3, jarg3); 
  
  free(arg3); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1array_1base_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_type **arg2 = (coda_type **) 0 ;
  coda_type *ppcoda_type2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  
  arg2 = &ppcoda_type2;
  
  {
    result = (int)coda_type_get_array_base_type((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_array_base_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_array_base_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1special_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_special_type *arg2 = (coda_special_type *) 0 ;
  coda_special_type temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_special_type)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_type_get_special_type((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_special_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_special_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_type_1get_1special_1base_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_type *arg1 = (coda_type *) 0 ;
  coda_type **arg2 = (coda_type **) 0 ;
  coda_type *ppcoda_type2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_type **)&jarg1; 
  
  arg2 = &ppcoda_type2;
  
  {
    result = (int)coda_type_get_special_base_type((struct coda_type_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_type_get_special_base_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_type_get_special_base_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1set_1product(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_product *arg2 = (coda_product *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = *(coda_product **)&jarg2; 
  {
    result = (int)coda_cursor_set_product(arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_set_product");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_set_product(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    result = (int)coda_cursor_goto(arg1,(char const *)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1first_1record_1field(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_first_record_field(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_first_record_field");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_first_record_field(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1next_1record_1field(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_next_record_field(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_next_record_field");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_next_record_field(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1record_1field_1by_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    result = (int)coda_cursor_goto_record_field_by_index(arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_record_field_by_index");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_record_field_by_index(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1record_1field_1by_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    result = (int)coda_cursor_goto_record_field_by_name(arg1,(char const *)arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_record_field_by_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_record_field_by_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1available_1union_1field(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_available_union_field(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_available_union_field");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_available_union_field(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1first_1array_1element(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_first_array_element(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_first_array_element");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_first_array_element(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1next_1array_1element(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_next_array_element(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_next_array_element");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_next_array_element(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1array_1element(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int arg2 ;
  long *arg3 ;
  jint *jarr3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (int)jarg2; 
  if (!SWIG_JavaArrayInLong(jenv, &jarr3, (long **)&arg3, jarg3)) return 0; 
  {
    result = (int)coda_cursor_goto_array_element(arg1,arg2,(long const (*))arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_array_element");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_array_element(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutLong(jenv, jarr3, (long *)arg3, jarg3); 
  free(arg3); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1array_1element_1by_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    result = (int)coda_cursor_goto_array_element_by_index(arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_array_element_by_index");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_array_element_by_index(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1attributes(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_attributes(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_attributes");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_attributes(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1root(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_root(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_root");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_root(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1goto_1parent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_goto_parent(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_goto_parent");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_goto_parent(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1use_1base_1type_1of_1special_1type(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    result = (int)coda_cursor_use_base_type_of_special_type(arg1);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_use_base_type_of_special_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_use_base_type_of_special_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1has_1ascii_1content(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_has_ascii_content((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_has_ascii_content");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_has_ascii_content(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1has_1attributes(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_has_attributes((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_has_attributes");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_has_attributes(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1string_1length(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_string_length((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_string_length");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_string_length(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1bit_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_bit_size((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_bit_size");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_bit_size(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1byte_1size(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_byte_size((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_byte_size");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_byte_size(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1num_1elements(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_num_elements((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_num_elements");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_num_elements(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1product_1file(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_product **arg2 = (coda_product **) 0 ;
  coda_product *ppcoda_product2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  
  arg2 = &ppcoda_product2;
  
  {
    result = (int)coda_cursor_get_product_file((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_product_file");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_product_file(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_product_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_product **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1depth(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int *arg2 = (int *) 0 ;
  int temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_depth((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_depth");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_depth(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_index((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_index");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_index(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1file_1bit_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_file_bit_offset((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_file_bit_offset");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_file_bit_offset(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1file_1byte_1offset(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int64_t)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_file_byte_offset((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_file_byte_offset");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_file_byte_offset(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1format(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_format *arg2 = (coda_format *) 0 ;
  coda_format temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_format)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_format((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_format");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_format(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1type_1class(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_type_class *arg2 = (coda_type_class *) 0 ;
  coda_type_class temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_type_class)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_type_class((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_type_class");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_type_class(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1read_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_native_type *arg2 = (coda_native_type *) 0 ;
  coda_native_type temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_native_type)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_read_type((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_read_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_read_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1special_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_special_type *arg2 = (coda_special_type *) 0 ;
  coda_special_type temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_special_type)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_special_type((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_special_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_special_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  coda_type **arg2 = (coda_type **) 0 ;
  coda_type *ppcoda_type2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  
  arg2 = &ppcoda_type2;
  
  {
    result = (int)coda_cursor_get_type((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_type_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_type **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1record_1field_1index_1from_1name(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  char *arg2 = (char *) 0 ;
  long *arg3 = (long *) 0 ;
  long temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0);
    if (!arg2) return 0;
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (long)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_cursor_get_record_field_index_from_name((struct coda_cursor_struct const *)arg1,(char const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_record_field_index_from_name");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_record_field_index_from_name(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1record_1field_1available_1status(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  int *arg3 = (int *) 0 ;
  int temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_cursor_get_record_field_available_status((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_record_field_available_status");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_record_field_available_status(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1available_1union_1field_1index(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long *arg2 = (long *) 0 ;
  long temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (long)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_cursor_get_available_union_field_index((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_available_union_field_index");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_available_union_field_index(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1get_1array_1dim(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int *arg2 = (int *) 0 ;
  long *arg3 ;
  int temp2 ;
  jint *jarr3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (int)0;
    arg2 = &temp2; 
  }
  if (!SWIG_JavaArrayInLong(jenv, &jarr3, (long **)&arg3, jarg3)) return 0; 
  {
    result = (int)coda_cursor_get_array_dim((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_get_array_dim");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_get_array_dim(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  SWIG_JavaArrayArgoutLong(jenv, jarr3, (long *)arg3, jarg3); 
  
  free(arg3); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int8(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int8_t *arg2 = (int8_t *) 0 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_int8((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int8");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int8(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint8(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_uint8((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint8");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint8(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int16(JNIEnv *jenv, jclass jcls, jlong jarg1, jshortArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int16_t *arg2 = (int16_t *) 0 ;
  jshort *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr2, (short **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_int16((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int16");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int16(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr2, (short *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint16(JNIEnv *jenv, jclass jcls, jlong jarg1, jshortArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint16_t *arg2 = (uint16_t *) 0 ;
  jshort *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr2, (short **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_uint16((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint16");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint16(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr2, (short *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int32(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int32_t *arg2 = (int32_t *) 0 ;
  jint *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr2, (int **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_int32((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int32");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int32(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr2, (int *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint32(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint32_t *arg2 = (uint32_t *) 0 ;
  jint *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr2, (int **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_uint32((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint32");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint32(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr2, (int *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int64(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  jlong *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInLonglong(jenv, &jarr2, (long long **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_int64((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int64");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int64(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutLonglong(jenv, jarr2, (long long *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1float(JNIEnv *jenv, jclass jcls, jlong jarg1, jfloatArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  float *arg2 = (float *) 0 ;
  jfloat *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInFloat(jenv, &jarr2, (float **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_float((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_float");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_float(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutFloat(jenv, jarr2, (float *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1bits(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jlong jarg3, jlong jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  int64_t arg3 ;
  int64_t arg4 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  arg3 = (int64_t)jarg3; 
  arg4 = (int64_t)jarg4; 
  {
    result = (int)coda_cursor_read_bits((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_bits");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_bits(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1bytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jlong jarg3, jlong jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  int64_t arg3 ;
  int64_t arg4 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  arg3 = (int64_t)jarg3; 
  arg4 = (int64_t)jarg4; 
  {
    result = (int)coda_cursor_read_bytes((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_bytes");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_bytes(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int8_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int8_t *arg2 = (int8_t *) 0 ;
  coda_array_ordering arg3 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_int8_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int8_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int8_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint8_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  coda_array_ordering arg3 ;
  jbyte *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr2, (signed char **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_uint8_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint8_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint8_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr2, (signed char *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int16_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jshortArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int16_t *arg2 = (int16_t *) 0 ;
  coda_array_ordering arg3 ;
  jshort *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr2, (short **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_int16_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int16_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int16_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr2, (short *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint16_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jshortArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint16_t *arg2 = (uint16_t *) 0 ;
  coda_array_ordering arg3 ;
  jshort *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr2, (short **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_uint16_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint16_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint16_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr2, (short *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int32_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int32_t *arg2 = (int32_t *) 0 ;
  coda_array_ordering arg3 ;
  jint *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr2, (int **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_int32_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int32_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int32_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr2, (int *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint32_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint32_t *arg2 = (uint32_t *) 0 ;
  coda_array_ordering arg3 ;
  jint *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr2, (int **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_uint32_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint32_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint32_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr2, (int *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int64_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  int64_t *arg2 = (int64_t *) 0 ;
  coda_array_ordering arg3 ;
  jlong *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInLonglong(jenv, &jarr2, (long long **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_int64_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int64_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int64_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutLonglong(jenv, jarr2, (long long *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint64_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jlongArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  uint64_t *arg2 = (uint64_t *) 0 ;
  coda_array_ordering arg3 ;
  uint64_t temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (uint64_t)0;
    arg2 = &temp2; 
  }
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_uint64_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint64_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint64_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp2;
    (*jenv)->SetLongArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1float_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jfloatArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  float *arg2 = (float *) 0 ;
  coda_array_ordering arg3 ;
  jfloat *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInFloat(jenv, &jarr2, (float **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_float_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_float_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_float_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutFloat(jenv, jarr2, (float *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1double_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  coda_array_ordering arg3 ;
  jdouble *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInDouble(jenv, &jarr2, (double **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_double_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_double_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_double_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutDouble(jenv, jarr2, (double *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int8_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jbyteArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  int8_t *arg4 = (int8_t *) 0 ;
  jbyte *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr4, (signed char **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_int8_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int8_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int8_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr4, (signed char *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint8_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jbyteArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  uint8_t *arg4 = (uint8_t *) 0 ;
  jbyte *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInSchar(jenv, &jarr4, (signed char **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_uint8_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint8_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint8_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutSchar(jenv, jarr4, (signed char *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int16_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jshortArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  int16_t *arg4 = (int16_t *) 0 ;
  jshort *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr4, (short **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_int16_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int16_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int16_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr4, (short *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint16_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jshortArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  uint16_t *arg4 = (uint16_t *) 0 ;
  jshort *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInShort(jenv, &jarr4, (short **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_uint16_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint16_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint16_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutShort(jenv, jarr4, (short *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int32_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jintArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  int32_t *arg4 = (int32_t *) 0 ;
  jint *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr4, (int **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_int32_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int32_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int32_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr4, (int *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint32_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jintArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  uint32_t *arg4 = (uint32_t *) 0 ;
  jint *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInInt(jenv, &jarr4, (int **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_uint32_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint32_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint32_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutInt(jenv, jarr4, (int *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1int64_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jlongArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  int64_t *arg4 = (int64_t *) 0 ;
  jlong *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInLonglong(jenv, &jarr4, (long long **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_int64_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_int64_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_int64_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutLonglong(jenv, jarr4, (long long *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1uint64_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jlongArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  uint64_t *arg4 = (uint64_t *) 0 ;
  uint64_t temp4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (uint64_t)0;
    arg4 = &temp4; 
  }
  {
    result = (int)coda_cursor_read_uint64_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_uint64_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_uint64_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp4;
    (*jenv)->SetLongArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1float_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jfloatArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  float *arg4 = (float *) 0 ;
  jfloat *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInFloat(jenv, &jarr4, (float **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_float_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_float_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_float_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutFloat(jenv, jarr4, (float *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1double_1partial_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jdoubleArray jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  long arg2 ;
  long arg3 ;
  double *arg4 = (double *) 0 ;
  jdouble *jarr4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  arg2 = (long)jarg2; 
  arg3 = (long)jarg3; 
  if (!SWIG_JavaArrayInDouble(jenv, &jarr4, (double **)&arg4, jarg4)) return 0; 
  {
    result = (int)coda_cursor_read_double_partial_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_double_partial_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_double_partial_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutDouble(jenv, jarr4, (double *)arg4, jarg4); 
  free(arg4); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1complex_1double_1pair(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  jdouble *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInDouble(jenv, &jarr2, (double **)&arg2, jarg2)) return 0; 
  {
    result = (int)coda_cursor_read_complex_double_pair((struct coda_cursor_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_complex_double_pair");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_complex_double_pair(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutDouble(jenv, jarr2, (double *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1complex_1double_1pairs_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  coda_array_ordering arg3 ;
  jdouble *jarr2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  if (!SWIG_JavaArrayInDouble(jenv, &jarr2, (double **)&arg2, jarg2)) return 0; 
  arg3 = (coda_array_ordering)jarg3; 
  {
    result = (int)coda_cursor_read_complex_double_pairs_array((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_complex_double_pairs_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_complex_double_pairs_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  SWIG_JavaArrayArgoutDouble(jenv, jarr2, (double *)arg2, jarg2); 
  free(arg2); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1complex_1double_1split(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jdoubleArray jarg3) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double temp2 ;
  double temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (double)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (double)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_cursor_read_complex_double_split((struct coda_cursor_struct const *)arg1,arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_complex_double_split");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_complex_double_split(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp2;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jdouble jvalue = (jdouble)temp3;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_cursor_1read_1complex_1double_1split_1array(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jdoubleArray jarg3, jint jarg4) {
  jint jresult = 0 ;
  coda_cursor *arg1 = (coda_cursor *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  coda_array_ordering arg4 ;
  double temp2 ;
  double temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_cursor **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (double)0;
    arg2 = &temp2; 
  }
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (double)0;
    arg3 = &temp3; 
  }
  arg4 = (coda_array_ordering)jarg4; 
  {
    result = (int)coda_cursor_read_complex_double_split_array((struct coda_cursor_struct const *)arg1,arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_cursor_read_complex_double_split_array");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_cursor_read_complex_double_split_array(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp2;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  {
    jdouble jvalue = (jdouble)temp3;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1from_1string(JNIEnv *jenv, jclass jcls, jstring jarg1, jobject jarg2) {
  jint jresult = 0 ;
  char *arg1 = (char *) 0 ;
  coda_expression **arg2 = (coda_expression **) 0 ;
  coda_expression *ppcoda_expression2 = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
    if (!arg1) return 0;
  }
  
  arg2 = &ppcoda_expression2;
  
  {
    result = (int)coda_expression_from_string((char const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_from_string");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_from_string(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    /* Give Java proxy the C pointer (of newly created object) */
    jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/SWIGTYPE_p_coda_expression_struct");
    jfieldID fid = (*jenv)->GetFieldID(jenv, clazz, "swigCPtr", "J");
    jlong cPtr = 0;
    *(coda_expression **)&cPtr = *arg2;
    (*jenv)->SetLongField(jenv, jarg2, fid, cPtr);
  }
  if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1get_1type(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_expression_type *arg2 = (coda_expression_type *) 0 ;
  coda_expression_type temp2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  {
    if (!jarg2) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp2 = (coda_expression_type)0;
    arg2 = &temp2; 
  }
  {
    result = (int)coda_expression_get_type((struct coda_expression_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_get_type");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_get_type(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp2;
    (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1eval_1bool(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jintArray jarg3) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_cursor *arg2 = (coda_cursor *) 0 ;
  int *arg3 = (int *) 0 ;
  int temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_cursor **)&jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_expression_eval_bool((struct coda_expression_struct const *)arg1,(struct coda_cursor_struct const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_eval_bool");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_eval_bool(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jint jvalue = (jint)temp3;
    (*jenv)->SetIntArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1eval_1integer(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlongArray jarg3) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_cursor *arg2 = (coda_cursor *) 0 ;
  int64_t *arg3 = (int64_t *) 0 ;
  int64_t temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_cursor **)&jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (int64_t)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_expression_eval_integer((struct coda_expression_struct const *)arg1,(struct coda_cursor_struct const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_eval_integer");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_eval_integer(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jlong jvalue = (jlong)temp3;
    (*jenv)->SetLongArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1eval_1float(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jdoubleArray jarg3) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_cursor *arg2 = (coda_cursor *) 0 ;
  double *arg3 = (double *) 0 ;
  double temp3 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_cursor **)&jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp3 = (double)0;
    arg3 = &temp3; 
  }
  {
    result = (int)coda_expression_eval_float((struct coda_expression_struct const *)arg1,(struct coda_cursor_struct const *)arg2,arg3);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_eval_float");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_eval_float(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jdouble jvalue = (jdouble)temp3;
    (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1eval_1string(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jobjectArray jarg3, jintArray jarg4) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_cursor *arg2 = (coda_cursor *) 0 ;
  char **arg3 = (char **) 0 ;
  long *arg4 = (long *) 0 ;
  char *temp3 ;
  long temp4 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_cursor **)&jarg2; 
  {
    if (!jarg3) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    arg3 = &temp3; 
    *arg3 = 0;
  }
  {
    if (!jarg4) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
      return 0;
    }
    if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) {
      SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
      return 0;
    }
    temp4 = (long)0;
    arg4 = &temp4; 
  }
  {
    result = (int)coda_expression_eval_string((struct coda_expression_struct const *)arg1,(struct coda_cursor_struct const *)arg2,arg3,arg4);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_eval_string");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_eval_string(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  {
    jstring jnewstring = NULL;
    if (arg3) {
      jnewstring = (*jenv)->NewStringUTF(jenv, *arg3);
    }
    (*jenv)->SetObjectArrayElement(jenv, jarg3, 0, jnewstring); 
  }
  {
    jint jvalue = (jint)temp4;
    (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue);
  }
  {
    coda_free(*arg3);
  }
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_nl_stcorp_coda_codacJNI_expression_1eval_1node(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  jint jresult = 0 ;
  coda_expression *arg1 = (coda_expression *) 0 ;
  coda_cursor *arg2 = (coda_cursor *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(coda_expression **)&jarg1; 
  arg2 = *(coda_cursor **)&jarg2; 
  {
    result = (int)coda_expression_eval_node((struct coda_expression_struct const *)arg1,arg2);
    
    if (result < 0)
    {
      int namelen = (int)strlen("coda_expression_eval_node");
      const char *codamsg = coda_errno_to_string(coda_errno);
      char *fullMessage = malloc(namelen + 4 + strlen(codamsg) + 1);
      jclass clazz = (*jenv)->FindClass(jenv, "nl/stcorp/coda/CodaException");
      
      sprintf(fullMessage, "coda_expression_eval_node(): %s", codamsg);
      (*jenv)->ThrowNew(jenv, clazz, fullMessage);
      free(fullMessage);
      return 0;
    }
  }
  return jresult;
}


#ifdef __cplusplus
}
#endif

