You need to allocate a buffer where H5D.read() stores the data. H5Array doesn't 
do that, it's just a wrapper. You should have something like:

                Metadata[] s1 = new Metadata[datasetSize];
            H5DataSetId dsetId = H5D.open(fileID, "/metadata/songs");
            H5DataTypeId dataType = H5D.getType(dsetId);
            H5D.read(dsetId, dataType, new H5Array<metadata>(s1));


Scott

> -----Original Message-----
> From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of
> Insane
> Sent: Wednesday, April 10, 2013 5:17 PM
> To: hdf-forum@hdfgroup.org
> Subject: Re: [Hdf-forum] c# read different datatypes
>
> The only thing I saw in examples was next:
>  H5DataTypeId typeId = H5T.copy(H5T.H5Type.C_S1); But i don't actually
> know how it can help.Can u explain exactly how it should be defined ?
>
>
>
>
> --
> View this message in context: http://hdf-forum.184993.n3.nabble.com/c-
> read-different-datatypes-tp4026057p4026073.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

________________________________

This e-mail and any files transmitted with it may be proprietary and are 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this e-mail in error please notify the sender. 
Please note that any views or opinions presented in this e-mail are solely 
those of the author and do not necessarily represent those of Exelis Inc. The 
recipient should check this e-mail and any attachments for the presence of 
viruses. Exelis Inc. accepts no liability for any damage caused by any virus 
transmitted by this e-mail.

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

Reply via email to