Skip to main content

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);







After the data is created and written into the file, when the user tries to open and read the data in HDF view, instead of 18.9, it shows 1.3456789345E45


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?