diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-18 21:52:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 21:52:01 (GMT) |
commit | bd37363332c0016262a05e4515b9f0e30e9b3d89 (patch) | |
tree | 11fbd1dd00bb16c6e5b6075da5ad9dcb224ed43f /java/examples | |
parent | 8dc72928b8c2f0390659d14011b34983cf9b1171 (diff) | |
download | hdf5-bd37363332c0016262a05e4515b9f0e30e9b3d89.zip hdf5-bd37363332c0016262a05e4515b9f0e30e9b3d89.tar.gz hdf5-bd37363332c0016262a05e4515b9f0e30e9b3d89.tar.bz2 |
various cleanup java test, test files, comments (#1363)
Diffstat (limited to 'java/examples')
-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 |