gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class HDF5Util

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.HDF5Util

public class HDF5Util
extends java.lang.Object

Provides one method to clean up the HDF5 libs possibly open descriptors. If this is not done the interface/library will eventually blow a gasket. Even with careful tracking of all open descriptors it *seems* that inevitably there is some descriptors left open someplace, and this can lead to a leak... Which will result in the HDF5 JNI crashing the JVM. The approach is to walk through the descriptor table and simply call every close function call available since there is no way to tell by the descriptor itself which kind it is... Yuck. Ok fine, I admit it, it's yucky but it seems to work.


Constructor Summary
HDF5Util()
           
 
Method Summary
static void cleanup()
          This cleans up the HDF5 interface by attempting to close all open descriptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDF5Util

public HDF5Util()
Method Detail

cleanup

public static void cleanup()
This cleans up the HDF5 interface by attempting to close all open descriptors. It does this by getting the descriptor list and trying to close each by calling the various H5.XXXclose() methods, ignoring any thrown exceptions. If at the end, it is unable to close the entire library a runtime exception is thrown.