Class H5Object

java.lang.Object
nz.org.riskscape.hdf5.H5Object
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
H5Attribute, H5Dataset, H5DataSpace, H5File, H5Group, H5Type

public abstract class H5Object extends Object implements AutoCloseable

Base class for any object that wraps the anonymous IDs that are returned from the H5 library. Typically these all need to be closed, and so this class implements AutoCloseable to prevent resource leaks.

  • Field Details

    • ptr

      protected final long ptr
  • Constructor Details

    • H5Object

      public H5Object(long ptr)
  • Method Details

    • getPointer

      public long getPointer()
      Returns:
      the underlying object id/pointer that is used to identify this object when making calls to the underlying hdf5 API
    • close

      public abstract void close() throws RuntimeException
      Specified by:
      close in interface AutoCloseable
      Throws:
      RuntimeException