diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-24 21:41:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 21:41:03 (GMT) |
commit | 7f214d6e0ded27bc44d354396eb72ff2f65f1f03 (patch) | |
tree | fa13d8d2fa704eee096dd2dda7e27f82867a74d0 /java | |
parent | b88cfdbfc9a6f2ff737d73ba4cb4931e5ffe2e74 (diff) | |
download | hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.zip hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.tar.gz hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.tar.bz2 |
Merge various cleanup java test, test files, comments (#1365)
Plus some spelling corrections
Diffstat (limited to 'java')
-rw-r--r-- | java/examples/datasets/H5Ex_D_Sofloat.java | 13 | ||||
-rw-r--r-- | java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index a42aba4..8edde09 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -21,6 +21,9 @@ ************************************************************/ package examples.datasets; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; @@ -123,8 +126,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in write buffer is: " + max); - System.out.println("Minimum value in write buffer is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in write buffer is: " + df.format(max)); + System.out.println("Minimum value in write buffer is: " + df.format(min)); // Create a new file using the default properties. try { @@ -308,8 +312,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in " + DATASETNAME + " is: " + max); - System.out.println("Minimum value in " + DATASETNAME + " is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in " + DATASETNAME + " is: " + df.format(max)); + System.out.println("Minimum value in " + DATASETNAME + " is: " + df.format(min)); // End access to the dataset and release resources used by it. try { diff --git a/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt b/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt index 4d4b5d6..9025ce2 100644 --- a/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt +++ b/java/examples/testfiles/examples.datasets.H5Ex_D_Sofloat.txt @@ -1,6 +1,6 @@ -Maximum value in write buffer is: 106.66666666666667 -Minimum value in write buffer is: 1.7692307692307692 +Maximum value in write buffer is: 106.666667 +Minimum value in write buffer is: 1.769231 Filter type is: H5Z_FILTER_SCALEOFFSET -Maximum value in DS1 is: 106.66169811320755 -Minimum value in DS1 is: 1.7692307692307692 +Maximum value in DS1 is: 106.661698 +Minimum value in DS1 is: 1.769231 |