I'm trying to write an attribute that just has a single string as data and I do
not want it wrapped in an array. The Attribute class' JavaDoc suggests you
could set the dimensions to null for scalar data, but line 1743 ind H5File does
not handle that case:
sid = H5.H5Screate_simple(attr.getRank(), attr.getDataDims(), null);
I guess it should do
if (attr.getDataDims() == null) {
sid = H5.H5Screate(HDF5Constants.H5S_SCALAR);
} else {
sid = H5.H5Screate_simple(attr.getRank(), attr.getDataDims(), null);
}
The only other way is in the client code to revert to using all that H5.* stuff
yourself, with all the int ids and return value checking you'd rather avoid in
Java.
I haven't tried the above code, but does that look reasonable? Did I miss
another way of doing the same thing?
Cheers,
Tobias
--
This e-mail and any attachments may contain confidential, copyright and or
privileged material, and are for the use of the intended addressee only. If you
are not the intended addressee or an authorised recipient of the addressee
please notify us of receipt by returning the e-mail and do not use, copy,
retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not
necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments
are free from viruses and we cannot accept liability for any damage which you
may sustain as a result of software viruses which may be transmitted in or with
the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and
Wales with its registered office at Diamond House, Harwell Science and
Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org