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.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org