Hi Chris,

H5Tconvert() was not supported in hdf-java 2.6 and is partially supported
in hdf-java 2.7 (beta release is out as Barbara mentioned).

Right now, H5Tconvert() in hdf-java only takes byte buffers as input and
output, i.e.

void H5Tconvert(int src_id, int dst_id, long nelmts, byte[] buf,
    byte[] background, int plist_id)

For example, if you want to convert unsigned short (2-byte integer) to
a 4-byte integer, you have to convert your short buffer to a byte array
and pass and allocate a byte buff as the output and pass it to H5Tconvert.
You then convert the output buffer from H5Tconvert to a 4-byte integer array.

A better approach is to implement a method that takes an object as the
buffer, i.e.

void H5Tconvert(int src_id, int dst_id, long nelmts, object buf,
    object background, int plist_id)

Since there is no direct mapping between Java object and C void*,
the implementation of the Java method above requires a lot of work.

Also, some datatype, e.g. compound datatype, will be extremely hard
to implement in Java. So we provide a middle-way method for our users.

Thanks
--pc


On 10/5/2010 12:51 PM, Brown, Chris wrote:

Hi Barbara,

Thanks, this is exactly the information that I was looking for. Assuming these calls are exposed in the Java API, this solution should be acceptable for what I am trying to do. Thanks again for your help, I appreciate it.

Regards,

Chris


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

Reply via email to