I haven't used the java high level interface, but you should get some joy if 
you look here: 
http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/api16-java.html

In particular, look at

http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/java/examples/datatypes/H5Ex_T_String.java

and http://www.hdfgroup.org/HDF5/doc/H5.intro.html#Intro-PMCreateVariableLength

In C++, you create a HD5::StrType, and give H5T_VARIABLE as the length.  
There's a good example here:

http://stackoverflow.com/questions/581209/how-to-best-write-out-a-stdvector-stdstring-container-to-a-hdf5-dataset


On 3/24/11 11:54 AM, "Konrad Hinsen" 
<[email protected]<mailto:[email protected]>> wrote:

My next problem with the high-level Java API is creating variable-length
strings, either in datasets or as attribute values. Nothing but strange
error messages... To start with, if I create a H5Datatype of CLASS_VLEN
and ask for its description, it is "unknown". Any use of such a datatype
leads to exceptions. Does anyone have a working example?

Thanks in advance,
   Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: research at  khinsen dot fastmail dot net
---------------------------------------------------------------------


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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to