diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-03-10 13:41:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 13:41:14 (GMT) |
commit | dd5b8a874757f23a1906d0a80ee77a112ad4a33d (patch) | |
tree | 93db0b67058adce2bf52c726a8745f6e2709ecd4 /java/examples | |
parent | 2524ad19c0b375ead91b614baf85f556dfce2b41 (diff) | |
download | hdf5-dd5b8a874757f23a1906d0a80ee77a112ad4a33d.zip hdf5-dd5b8a874757f23a1906d0a80ee77a112ad4a33d.tar.gz hdf5-dd5b8a874757f23a1906d0a80ee77a112ad4a33d.tar.bz2 |
1 10 Fix java data export functions (#450)
* HDFFV-10865 - merge from dev, HDFArray perf fix.
* Remove duplicate setting
* Whitespace changes after clang format
* Undo version 11 clang format changes
* Merge CMake changes from develop
* test testing script merge from develop
* Update supported platforms
* PR#3 merge from develop
* Merge gcc 10 diagnostics option from develop
* Merge #318 OSX changes from develop
* Merge small changes from develop
* Minor non-space formatting changes
* #386 copyright corrections for java folder
* Merges from develop
#358 patches from vtk
#361 fix header guard spelling
* Merge updates
#358 patches from vtk
#361 fix header guard spelling
* format fix
* Fix missing underscore and make H5public.h closer to dev
* Merges from develop
#340 clang -Wformat-security warnings
#360 Fixed uninitialized warnings
header guard underscore cleanup
JNI cleanup
* format alignment
* Add missing test ref file
* Merge #380 from develop
* Finish java merges from develop
* Fix java issues with tests and javadoc
* Correct use of attribute access plist
* Remove debug code
* Remove unused variable
* Change file access to read only for java tests
* Split clang format operations.
* More javadoc comments
* Remove pre-split setting
* format source
Diffstat (limited to 'java/examples')
51 files changed, 350 insertions, 350 deletions
diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java index d0e8f81..4e10c23 100644 --- a/java/examples/datasets/H5Ex_D_Alloc.java +++ b/java/examples/datasets/H5Ex_D_Alloc.java @@ -64,11 +64,11 @@ public class H5Ex_D_Alloc { } private static void allocation() { - long file_id = -1; - long filespace_id = -1; - long dataset_id1 = -1; - long dataset_id2 = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id1 = HDF5Constants.H5I_INVALID_HID; + long dataset_id2 = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; int space_status = 0; diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java index e0a1638..781dd68 100644 --- a/java/examples/datasets/H5Ex_D_Checksum.java +++ b/java/examples/datasets/H5Ex_D_Checksum.java @@ -92,10 +92,10 @@ public class H5Ex_D_Checksum { } private static void writeChecksum() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -192,9 +192,9 @@ public class H5Ex_D_Checksum { } private static void readChecksum() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java index 74e7530..2ddf293 100644 --- a/java/examples/datasets/H5Ex_D_Chunk.java +++ b/java/examples/datasets/H5Ex_D_Chunk.java @@ -65,10 +65,10 @@ public class H5Ex_D_Chunk { } private static void writeChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -200,10 +200,10 @@ public class H5Ex_D_Chunk { } private static void readChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java index 7751db9..0abf8da 100644 --- a/java/examples/datasets/H5Ex_D_Compact.java +++ b/java/examples/datasets/H5Ex_D_Compact.java @@ -59,10 +59,10 @@ public class H5Ex_D_Compact { } private static void writeCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -162,10 +162,10 @@ public class H5Ex_D_Compact { } private static void readCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file and dataset using the default properties. diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java index 1797ec8..9c3787f 100644 --- a/java/examples/datasets/H5Ex_D_External.java +++ b/java/examples/datasets/H5Ex_D_External.java @@ -33,10 +33,10 @@ public class H5Ex_D_External { private static final int NAME_BUF_SIZE = 32; private static void writeExternal() { - long file_id = -1; - long dcpl_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -137,9 +137,9 @@ public class H5Ex_D_External { } private static void readExternal() { - long file_id = -1; - long dcpl_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; String[] Xname = new String[1]; diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java index 4577249..3526993 100644 --- a/java/examples/datasets/H5Ex_D_FillValue.java +++ b/java/examples/datasets/H5Ex_D_FillValue.java @@ -39,10 +39,10 @@ public class H5Ex_D_FillValue { private static final int FILLVAL = 99; private static void fillValue() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java index 2529b47..404ff05 100644 --- a/java/examples/datasets/H5Ex_D_Gzip.java +++ b/java/examples/datasets/H5Ex_D_Gzip.java @@ -94,10 +94,10 @@ public class H5Ex_D_Gzip { } private static void writeGzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -195,9 +195,9 @@ public class H5Ex_D_Gzip { } private static void readGzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java index e77493f..fa3473f 100644 --- a/java/examples/datasets/H5Ex_D_Hyperslab.java +++ b/java/examples/datasets/H5Ex_D_Hyperslab.java @@ -33,9 +33,9 @@ public class H5Ex_D_Hyperslab { private static final int RANK = 2; private static void writeHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -141,10 +141,10 @@ public class H5Ex_D_Hyperslab { } private static void readHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java index fbb504b..35d23a9 100644 --- a/java/examples/datasets/H5Ex_D_Nbit.java +++ b/java/examples/datasets/H5Ex_D_Nbit.java @@ -95,11 +95,11 @@ public class H5Ex_D_Nbit { } private static void writeData() throws Exception { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dtype_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dtype_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -156,9 +156,9 @@ public class H5Ex_D_Nbit { } private static void readData() throws Exception { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java index da9d0b4..db930d3 100644 --- a/java/examples/datasets/H5Ex_D_ReadWrite.java +++ b/java/examples/datasets/H5Ex_D_ReadWrite.java @@ -31,9 +31,9 @@ public class H5Ex_D_ReadWrite { private static final int RANK = 2; private static void WriteDataset() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -108,8 +108,8 @@ public class H5Ex_D_ReadWrite { } private static void ReadDataset() { - long file_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java index 85192bb..1dd7c6a 100644 --- a/java/examples/datasets/H5Ex_D_Shuffle.java +++ b/java/examples/datasets/H5Ex_D_Shuffle.java @@ -121,10 +121,10 @@ public class H5Ex_D_Shuffle { } private static void writeShuffle() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -228,9 +228,9 @@ public class H5Ex_D_Shuffle { } private static void readShuffle() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index c1365f7..a42aba4 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -95,10 +95,10 @@ public class H5Ex_D_Sofloat { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; double[][] dset_data = new double[DIM_X][DIM_Y]; @@ -212,9 +212,9 @@ public class H5Ex_D_Sofloat { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; double[][] dset_data = new double[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java index 2192cb9..dd7664f 100644 --- a/java/examples/datasets/H5Ex_D_Soint.java +++ b/java/examples/datasets/H5Ex_D_Soint.java @@ -95,10 +95,10 @@ public class H5Ex_D_Soint { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -194,9 +194,9 @@ public class H5Ex_D_Soint { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java index ad04692..3fdc712 100644 --- a/java/examples/datasets/H5Ex_D_Szip.java +++ b/java/examples/datasets/H5Ex_D_Szip.java @@ -94,10 +94,10 @@ public class H5Ex_D_Szip { } private static void writeSzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -195,9 +195,9 @@ public class H5Ex_D_Szip { } private static void readSzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java index 0c63afd..069e80b 100644 --- a/java/examples/datasets/H5Ex_D_Transform.java +++ b/java/examples/datasets/H5Ex_D_Transform.java @@ -35,10 +35,10 @@ public class H5Ex_D_Transform { private static String RTRANSFORM = "x-1"; private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -143,9 +143,9 @@ public class H5Ex_D_Transform { private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java index 2e18b99..c82b2d6 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java @@ -38,10 +38,10 @@ public class H5Ex_D_UnlimitedAdd { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -142,9 +142,9 @@ public class H5Ex_D_UnlimitedAdd { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -292,9 +292,9 @@ public class H5Ex_D_UnlimitedAdd { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java index b651621..675b1ba 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java @@ -98,10 +98,10 @@ public class H5Ex_D_UnlimitedGzip { } private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -199,9 +199,9 @@ public class H5Ex_D_UnlimitedGzip { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -349,10 +349,10 @@ public class H5Ex_D_UnlimitedGzip { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java index 68aecc4..273ac3e 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java @@ -38,10 +38,10 @@ public class H5Ex_D_UnlimitedMod { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -142,9 +142,9 @@ public class H5Ex_D_UnlimitedMod { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; int[][] dset_data; @@ -278,9 +278,9 @@ public class H5Ex_D_UnlimitedMod { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java index 162ac89..3939b38 100644 --- a/java/examples/datatypes/H5Ex_T_Array.java +++ b/java/examples/datatypes/H5Ex_T_Array.java @@ -33,11 +33,11 @@ public class H5Ex_T_Array { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -151,10 +151,10 @@ public class H5Ex_T_Array { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java index 14ae9a4..c4c4bc4 100644 --- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java @@ -34,12 +34,12 @@ public class H5Ex_T_ArrayAttribute { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -83,7 +83,7 @@ public class H5Ex_T_ArrayAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -174,11 +174,11 @@ public class H5Ex_T_ArrayAttribute { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java index 95968d0..45d4e8a 100644 --- a/java/examples/datatypes/H5Ex_T_Bit.java +++ b/java/examples/datatypes/H5Ex_T_Bit.java @@ -31,9 +31,9 @@ public class H5Ex_T_Bit { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -115,9 +115,9 @@ public class H5Ex_T_Bit { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java index e093453..9b33ca5 100644 --- a/java/examples/datatypes/H5Ex_T_BitAttribute.java +++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java @@ -32,10 +32,10 @@ public class H5Ex_T_BitAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -65,7 +65,7 @@ public class H5Ex_T_BitAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -138,10 +138,10 @@ public class H5Ex_T_BitAttribute { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java index 204b632..62db5ea 100644 --- a/java/examples/datatypes/H5Ex_T_Commit.java +++ b/java/examples/datatypes/H5Ex_T_Commit.java @@ -100,9 +100,9 @@ public class H5Ex_T_Commit { } private static void CreateDataType() { - long file_id = -1; - long strtype_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; Sensor_Datatype datatypes = new Sensor_Datatype(); // Create a new file using default properties. try { @@ -182,9 +182,9 @@ public class H5Ex_T_Commit { } private static void ReadDataType() { - long file_id = -1; - long typeclass_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long typeclass_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; // Open an existing file. try { diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java index f0fe715..8c83ebb 100644 --- a/java/examples/datatypes/H5Ex_T_Compound.java +++ b/java/examples/datatypes/H5Ex_T_Compound.java @@ -121,12 +121,12 @@ public class H5Ex_T_Compound { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -285,11 +285,11 @@ public class H5Ex_T_Compound { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java index d8fd4a1..58d2fb7 100644 --- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java +++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java @@ -124,13 +124,13 @@ public class H5Ex_T_CompoundAttribute { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -204,7 +204,7 @@ public class H5Ex_T_CompoundAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -309,12 +309,12 @@ public class H5Ex_T_CompoundAttribute { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java index f907b1f..e8da7f6 100644 --- a/java/examples/datatypes/H5Ex_T_Float.java +++ b/java/examples/datatypes/H5Ex_T_Float.java @@ -35,9 +35,9 @@ public class H5Ex_T_Float { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -119,9 +119,9 @@ public class H5Ex_T_Float { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java index 32b5a94..eb8e1f8 100644 --- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java +++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java @@ -36,10 +36,10 @@ public class H5Ex_T_FloatAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -65,7 +65,7 @@ public class H5Ex_T_FloatAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -138,10 +138,10 @@ public class H5Ex_T_FloatAttribute { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java index ddcc156..bb8e0cb 100644 --- a/java/examples/datatypes/H5Ex_T_Integer.java +++ b/java/examples/datatypes/H5Ex_T_Integer.java @@ -33,9 +33,9 @@ public class H5Ex_T_Integer { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -116,9 +116,9 @@ public class H5Ex_T_Integer { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java index 9024c9e..b0df5e4 100644 --- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java +++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java @@ -34,10 +34,10 @@ public class H5Ex_T_IntegerAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -63,7 +63,7 @@ public class H5Ex_T_IntegerAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -136,10 +136,10 @@ public class H5Ex_T_IntegerAttribute { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java index f561aa1..38536b8 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReference.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java @@ -64,11 +64,11 @@ public class H5Ex_T_ObjectReference { } private static void writeObjRef() { - long file_id = -1; - long dataspace_id = -1; - long filespace_id = -1; - long group_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -89,9 +89,9 @@ public class H5Ex_T_ObjectReference { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -105,7 +105,7 @@ public class H5Ex_T_ObjectReference { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -186,11 +186,11 @@ public class H5Ex_T_ObjectReference { } private static void readObjRef() { - long file_id = -1; - long dataset_id = -1; - long dataspace_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java index 8d04454..b38b0a0 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java @@ -66,11 +66,11 @@ public class H5Ex_T_ObjectReferenceAttribute { } private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long group_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -91,9 +91,9 @@ public class H5Ex_T_ObjectReferenceAttribute { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -107,7 +107,7 @@ public class H5Ex_T_ObjectReferenceAttribute { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -138,7 +138,7 @@ public class H5Ex_T_ObjectReferenceAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -211,12 +211,12 @@ public class H5Ex_T_ObjectReferenceAttribute { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java index c4ee39f..e851fb2 100644 --- a/java/examples/datatypes/H5Ex_T_Opaque.java +++ b/java/examples/datatypes/H5Ex_T_Opaque.java @@ -31,10 +31,10 @@ public class H5Ex_T_Opaque { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -137,11 +137,11 @@ public class H5Ex_T_Opaque { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long type_len = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long type_len = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data; String tag_name = null; diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java index 4407451..3e16ab4 100644 --- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java +++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java @@ -32,11 +32,11 @@ public class H5Ex_T_OpaqueAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -64,7 +64,7 @@ public class H5Ex_T_OpaqueAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -157,11 +157,11 @@ public class H5Ex_T_OpaqueAttribute { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long type_len = -1; long[] dims = { DIM0 }; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java index 7b63c35..e497bd8 100644 --- a/java/examples/datatypes/H5Ex_T_String.java +++ b/java/examples/datatypes/H5Ex_T_String.java @@ -31,11 +31,11 @@ public class H5Ex_T_String { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -155,11 +155,11 @@ public class H5Ex_T_String { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java index 0c9d40c..700f6a9 100644 --- a/java/examples/datatypes/H5Ex_T_StringAttribute.java +++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java @@ -32,12 +32,12 @@ public class H5Ex_T_StringAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -79,7 +79,7 @@ public class H5Ex_T_StringAttribute { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -178,12 +178,12 @@ public class H5Ex_T_StringAttribute { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java index 933b0b4..8a29e60 100644 --- a/java/examples/datatypes/H5Ex_T_VLString.java +++ b/java/examples/datatypes/H5Ex_T_VLString.java @@ -25,10 +25,10 @@ public class H5Ex_T_VLString private static String DATASETNAME = "DS1"; private static void createDataset() { - long file_id = -1; - long type_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int rank = 1; String[] str_data = { "Parting", "is such", "sweet", "sorrow." }; long[] dims = { str_data.length }; @@ -92,9 +92,9 @@ public class H5Ex_T_VLString } private static void readDataset() { - long file_id = -1; - long type_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; String[] str_data = { "", "", "", "" }; try { diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java index 0ae98c9..313c9c7 100644 --- a/java/examples/groups/H5Ex_G_Compact.java +++ b/java/examples/groups/H5Ex_G_Compact.java @@ -59,9 +59,9 @@ public class H5Ex_G_Compact { } public static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long fapl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; long size; diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java index 61b5b7f..5df850e 100644 --- a/java/examples/groups/H5Ex_G_Corder.java +++ b/java/examples/groups/H5Ex_G_Corder.java @@ -24,10 +24,10 @@ public class H5Ex_G_Corder { private static String FILE = "H5Ex_G_Corder.h5"; private static void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; int status; H5G_info_t ginfo; int i; diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java index 16b2028..9304538 100644 --- a/java/examples/groups/H5Ex_G_Create.java +++ b/java/examples/groups/H5Ex_G_Create.java @@ -24,8 +24,8 @@ public class H5Ex_G_Create { private static String GROUPNAME = "G1"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java index 130ec09..9f0eedd 100644 --- a/java/examples/groups/H5Ex_G_Intermediate.java +++ b/java/examples/groups/H5Ex_G_Intermediate.java @@ -30,9 +30,9 @@ public class H5Ex_G_Intermediate { private void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; try { // Create a new file_id using the default properties. diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java index 47f55fe..af46712 100644 --- a/java/examples/groups/H5Ex_G_Iterate.java +++ b/java/examples/groups/H5Ex_G_Iterate.java @@ -56,7 +56,7 @@ public class H5Ex_G_Iterate { } private static void do_iterate() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Open a file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java index b1c2afc..67a2f53 100644 --- a/java/examples/groups/H5Ex_G_Phase.java +++ b/java/examples/groups/H5Ex_G_Phase.java @@ -59,11 +59,11 @@ public class H5Ex_G_Phase { } private static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long fapl_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; String name = "G0"; // Name of subgroup_id int i; diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java index 3410c63..5378778 100644 --- a/java/examples/groups/H5Ex_G_Traverse.java +++ b/java/examples/groups/H5Ex_G_Traverse.java @@ -42,7 +42,7 @@ public class H5Ex_G_Traverse { public static H5L_iterate_cb iter_cb = new H5L_iter_callbackT(); private static void OpenGroup() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; H5O_info_t infobuf; opdata od = new opdata(); diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java index 0e935de..9cc8ecd 100644 --- a/java/examples/groups/H5Ex_G_Visit.java +++ b/java/examples/groups/H5Ex_G_Visit.java @@ -46,7 +46,7 @@ public class H5Ex_G_Visit { private void VisitGroup() throws Exception { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; try { // Open file diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java index 12a09a6..949a770 100644 --- a/java/examples/intro/H5_CreateAttribute.java +++ b/java/examples/intro/H5_CreateAttribute.java @@ -27,10 +27,10 @@ public class H5_CreateAttribute { private static String DATASETATTRIBUTE = "Units"; private static void CreateDatasetAttribute() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims1 = { DIM_X, DIM_Y }; long[] dims = { 2 }; int[] attr_data = { 100, 200 }; diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java index f26e6b3..f938be2 100644 --- a/java/examples/intro/H5_CreateDataset.java +++ b/java/examples/intro/H5_CreateDataset.java @@ -26,9 +26,9 @@ public class H5_CreateDataset { private static final int DIM_Y = 6; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; // Create a new file using default properties. diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java index 078d1d7..d48ba6c 100644 --- a/java/examples/intro/H5_CreateFile.java +++ b/java/examples/intro/H5_CreateFile.java @@ -23,7 +23,7 @@ public class H5_CreateFile { static final String FILENAME = "H5_CreateFile.h5"; private static void CreateFile() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java index 640e5f6..c0bb954 100644 --- a/java/examples/intro/H5_CreateGroup.java +++ b/java/examples/intro/H5_CreateGroup.java @@ -24,8 +24,8 @@ public class H5_CreateGroup { private static String GROUPNAME = "MyGroup"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java index a445604..f2c6168 100644 --- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java +++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java @@ -26,10 +26,10 @@ public class H5_CreateGroupAbsoluteRelative { private static String GROUPNAME_B = "GroupB"; private static void CreateGroupAbsoluteAndRelative() { - long file_id = -1; - long group1_id = -1; - long group2_id = -1; - long group3_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; + long group3_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java index 22874a8..f1d1cba 100644 --- a/java/examples/intro/H5_CreateGroupDataset.java +++ b/java/examples/intro/H5_CreateGroupDataset.java @@ -31,12 +31,12 @@ public class H5_CreateGroupDataset { private static final int DIM2_Y = 10; private static void h5_crtgrpd() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long group_id = -1; - long group1_id = -1; - long group2_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; int[][] dset1_data = new int[DIM1_X][DIM1_Y]; int[][] dset2_data = new int[DIM2_X][DIM2_Y]; long[] dims1 = { DIM1_X, DIM1_Y }; @@ -107,7 +107,7 @@ public class H5_CreateGroupDataset { try { if (dataspace_id >= 0) H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -117,7 +117,7 @@ public class H5_CreateGroupDataset { try { if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java index 6ba3bc2..67e1ac5 100644 --- a/java/examples/intro/H5_ReadWrite.java +++ b/java/examples/intro/H5_ReadWrite.java @@ -26,9 +26,9 @@ public class H5_ReadWrite { private static final int DIM_Y = 6; private static void ReadWriteDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; |