Showing posts with label hdf5. Show all posts
Showing posts with label hdf5. Show all posts

Wednesday, February 29, 2012

Problems in storing data in a H5 file?



double val = 18.5;
ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
DataOutputStream datastream = new DataOutputStream(bytestream);
datastream.writeDouble(val);
datastream.flush();
datastream.close();
bytestream.close();
byte[] bytes = bytestream.toByteArray();
for (int j = 0; j < bytes.length; j++) {
write_data[indx] = bytes[j];
indx++;


H5.H5Dwrite(dataset_id, memtype_id, HDF5Constants.H5S_ALL,
HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT,write_data);