[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems w NetcdfFile.openInMemory



I'm trying to load netcdf data in an app with no local 'filesystem', such
as a jnlp (web start) environment.  Looks like the best bet, given the
Java Netcdf API, is to locate the data as as resource
(Class.getResourceAsStream). I can thus get the data into a byte[].

But passing that byte[] to NetcdfFile.openInMemory fails with a NPE.
Looking at the latest (2.2.09) sources, it seems that the
InMemoryRandomAccessFile is broken.  The 'buffer' attribute is attached to
the incoming data buf only after a call to 'init(1)' occurs.  The
superclass RandomAccessFile is thus is a bad state, causing an eventual
NPE.

Any help gratefully apprteciated,

Stuart