summaryrefslogtreecommitdiffstats
path: root/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/examples/datatypes/H5Ex_T_IntegerAttribute.java')
-rw-r--r--java/examples/datatypes/H5Ex_T_IntegerAttribute.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
index 8c85c63..b0df5e4 100644
--- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -35,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];
@@ -64,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) {
@@ -137,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;