0

I am trying to convert a product into netcdf object. i am using unidata library.

What i want to do is return a netcdf object into xml response.

In fact, I create NetcdfFileWriter with method

createNew()

. But a location is mandatory. I do not want to save the file somewhere because what i want is return it into xml response.

My method is now returning NetcdfFile created with the method above. But i still have a file on my disk that i do not want.

Have you an idea ?

0

1 Answer 1

1

It is not possible to create a NetcdfFile object in memory with the netCDF-Java library, because there's no in-memory implementation of the underlying RandomAccessFile. You could use a temp file as the location, e.g. java.io.File.createTempFile().

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, but it seems that the method NetcdfFileWriter.createNew(Version version, String location) does not take File as parameter. How can I do ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.