[Nexus] Writing String Arrays using the NeXus Java API
Stefan Flemming
stefan at flemming.info
Mon Aug 10 18:46:21 BST 2009
Hello again,
I try to figure out for some days how to write String Arrays using the
NeXus Java API.
Writing Strings is no problem but I'm unsure how to call putdata for
Arrays of Strings?
Here is my attempt:
int dim[] = new int[]{stringArray.length};
nexusFile.makedata(getName(), NexusFile.NX_CHAR, 1, dim);
nexusFile.opendata(getName());
nexusFile.putdata(stringArray); // <-- here I cannot use
getBytes since it is an array and not a String
storeAttributes(nexusFile);
nexusFile.closedata();
Regards and thank you for your answers,
Stefan Flemming
More information about the NeXus
mailing list