Write a float array to file in Java
-
29-10-2019 - |
Question
I'm reading in a NetCDF file and I want to read in each array as a float array and then write the float array to a new file. I can make it work if I read in the float array and then iterate over each element in the array (using a DataOutputStream), but this is very, very slow, my NetCDF files are over 1GB.
I tried using an ObjectOutputStream, but this writes extra bytes of information.
So, to recap. 1. Open NetCDF file 2. Read float array x from NetCDF file 3. Write float array x to raw data file in a single step 4. Repeat step 2 with x+1
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow