Java Datatype.getDatatypeOrder and getDatatypeSign

Hi All:

I've just started to get acquainted with the Java HDF Object Package, but I stumbled over some problems:

when I open a HDF5 dataset, and examine its Datatype, it seems that
- the 'sign' (obtained via getDatatypeSign method) is either -1 or SIGN_NONE ( the SIGN_2 value which I expect doesn't show up)
- the 'order' (obtained via the getDatatypeOrder method) always seems to return -1.

The files I'm working with are hdf5_test.h5 file, which comes with the package, and some files I prepared myself via the HDFView tool (with different settings for Byte ordering and signed/unsigned).

Thanks for any reaction,
Dominique

Hi Dominique,

How do you construct or get the datatype? Could you give us
the part of the code that shows the problem?

Thanks
--pc

···

On 3/20/2013 3:05 PM, NoNeed ToKnow wrote:

Hi All:

I've just started to get acquainted with the Java HDF Object Package, but I stumbled over some problems:

when I open a HDF5 dataset, and examine its Datatype, it seems that
- the 'sign' (obtained via getDatatypeSign method) is either -1 or SIGN_NONE ( the SIGN_2 value which I expect doesn't show up)
- the 'order' (obtained via the getDatatypeOrder method) always seems to return -1.

The files I'm working with are hdf5_test.h5 file, which comes with the package, and some files I prepared myself via the HDFView tool (with different settings for Byte ordering and signed/unsigned).

Thanks for any reaction,
Dominique

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Peter,

Thanks for the reaction.
Here is a simple piece of sample code, which looks at the datatype of the
"2D int array" dataset in the "hdf5_test.h5" file contained in the
distribution. The getDatatypeClass() and getDatatypeSize() seem to work,
getDatatypeOrder() and getDatatypeSign() return -1.

import ncsa.hdf.object.Dataset;
import ncsa.hdf.object.Datatype;
import ncsa.hdf.object.h5.H5File;

class test {
  public static void main(String[] args) throws Exception {
    H5File h5File = new H5File("D://tmp//hdf5_test.h5", H5File.READ);
    Dataset dataset = (Dataset)h5File.get("/arrays/2D int array");
    Datatype datatype = dataset.getDatatype();
    System.out.println("class: " + datatype.getDatatypeClass()); // gives 0,
being CLASS_INTEGER
    System.out.println("order: " + datatype.getDatatypeOrder()); // gives -1 ?
    System.out.println(" sign: " + datatype.getDatatypeSign()); // gives -1 ?
    System.out.println(" size: " + datatype.getDatatypeSize()); // gives 4,
being 32-bit integer
  }
}

Kind regards,
Dominique.

···

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/Java-Datatype-getDatatypeOrder-and-getDatatypeSign-tp4026007p4026011.html
Sent from the hdf-forum mailing list archive at Nabble.com.

Hi Dominique,

I can reproduce the problem. We will fix it.

We have planned a patch release in the next a few week. We will try to get
this fix to the patch.

Thank you very much for reporting the issue.

Thanks
--pc

···

On 3/21/2013 12:32 PM, fthesses wrote:

Hi Peter,

Thanks for the reaction.
Here is a simple piece of sample code, which looks at the datatype of the
"2D int array" dataset in the "hdf5_test.h5" file contained in the
distribution. The getDatatypeClass() and getDatatypeSize() seem to work,
getDatatypeOrder() and getDatatypeSign() return -1.

import ncsa.hdf.object.Dataset;
import ncsa.hdf.object.Datatype;
import ncsa.hdf.object.h5.H5File;

class test {
  public static void main(String[] args) throws Exception {
    H5File h5File = new H5File("D://tmp//hdf5_test.h5", H5File.READ);
    Dataset dataset = (Dataset)h5File.get("/arrays/2D int array");
    Datatype datatype = dataset.getDatatype();
    System.out.println("class: " + datatype.getDatatypeClass()); // gives 0,
being CLASS_INTEGER
    System.out.println("order: " + datatype.getDatatypeOrder()); // gives -1 ?
    System.out.println(" sign: " + datatype.getDatatypeSign()); // gives -1 ?
    System.out.println(" size: " + datatype.getDatatypeSize()); // gives 4,
being 32-bit integer
  }
}

Kind regards,
Dominique.

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/Java-Datatype-getDatatypeOrder-and-getDatatypeSign-tp4026007p4026011.html
Sent from the hdf-forum mailing list archive at Nabble.com.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org