summaryrefslogtreecommitdiffstats
path: root/java/examples/intro
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-03-01 20:07:44 (GMT)
committerGitHub <noreply@github.com>2021-03-01 20:07:44 (GMT)
commit498a6de93576a2d386d3b5ba1818355dce7ae8a4 (patch)
treed80178e4bb38015110329102be28e770eadce446 /java/examples/intro
parent7c507003c7585837dace9bbbec9fde7a80802dbf (diff)
downloadhdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.zip
hdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.tar.gz
hdf5-498a6de93576a2d386d3b5ba1818355dce7ae8a4.tar.bz2
1 12 merge java copyright header changes (#391)
* OESS-98 fix tools test for plugins * sync fork * Merge of changes from dev * Move problem option to bottom of the list until fixed * HDFFV-11106 - fix parsing optional args * HDFFV-11106 add note * grammer fix * Whitespace after clang formatting * Undo format version 11 changes * Update check to working version * Merge workflow and minor changes from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge serval small changes from dev * fix typo * Minor non-space formatting changes * GH #386 copyright corrections for java folder * revert because logic requires false return
Diffstat (limited to 'java/examples/intro')
-rw-r--r--java/examples/intro/H5_CreateAttribute.java9
-rw-r--r--java/examples/intro/H5_CreateDataset.java7
-rw-r--r--java/examples/intro/H5_CreateFile.java3
-rw-r--r--java/examples/intro/H5_CreateGroup.java5
-rw-r--r--java/examples/intro/H5_CreateGroupAbsoluteRelative.java9
-rw-r--r--java/examples/intro/H5_CreateGroupDataset.java17
-rw-r--r--java/examples/intro/H5_ReadWrite.java7
-rw-r--r--java/examples/intro/JavaIntroExample.sh.in1
-rw-r--r--java/examples/intro/Makefile.am1
9 files changed, 25 insertions, 34 deletions
diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java
index 22b03ad..949a770 100644
--- a/java/examples/intro/H5_CreateAttribute.java
+++ b/java/examples/intro/H5_CreateAttribute.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 *
@@ -28,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 7b56e83..f938be2 100644
--- a/java/examples/intro/H5_CreateDataset.java
+++ b/java/examples/intro/H5_CreateDataset.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 *
@@ -27,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 367e61f..d48ba6c 100644
--- a/java/examples/intro/H5_CreateFile.java
+++ b/java/examples/intro/H5_CreateFile.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 *
@@ -24,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 54f6252..c0bb954 100644
--- a/java/examples/intro/H5_CreateGroup.java
+++ b/java/examples/intro/H5_CreateGroup.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 *
@@ -25,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 b9c35d7..f2c6168 100644
--- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java
+++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.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 *
@@ -27,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 191a21a..f1d1cba 100644
--- a/java/examples/intro/H5_CreateGroupDataset.java
+++ b/java/examples/intro/H5_CreateGroupDataset.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 *
@@ -32,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 };
@@ -108,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();
@@ -118,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 812ac77..67e1ac5 100644
--- a/java/examples/intro/H5_ReadWrite.java
+++ b/java/examples/intro/H5_ReadWrite.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 *
@@ -27,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];
diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in
index 9677686..db741e5 100644
--- a/java/examples/intro/JavaIntroExample.sh.in
+++ b/java/examples/intro/JavaIntroExample.sh.in
@@ -1,7 +1,6 @@
#! /bin/sh
#
# 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
diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am
index 981ace0..7d1aeab 100644
--- a/java/examples/intro/Makefile.am
+++ b/java/examples/intro/Makefile.am
@@ -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