## visad.data.hdf5.hdf5objects
Class HDF5Datatype

    java.lang.Object
      visad.data.hdf5.hdf5objects.HDF5Object
          visad.data.hdf5.hdf5objects.HDF5Datatype

All Implemented Interfaces:
  Serializable

public class HDF5Datatype
extends HDF5Object

This class provides a mechanism to describe the storage format of individual data points of a data set.

A data type is a collection of data type properties, all of which can be stored on disk, and which when taken as a whole, provide complete information for data conversion to or from that data type. The interface provides functions to set and query properties of a data type.

A data point is an instance of a data type, which is an instance of a type class. We have defined a set of type classes and properties which can be extended at a later time. The atomic type classes are those which describe types which cannot be decomposed at the data type interface level; all other classes are compound.

For details of the HDF5 libraries, see the HDF5 Documentation at: http://hdf.ncsa.uiuc.edu/HDF5/doc/

See Also:
  Serialized Form

Field Summary

Fields inherited from class visad.data.hdf5.hdf5objects.HDF5Object
`ATTRIBUTE, DATASET, DATASPACE, DATATYPE, description, GROUP, HDF5FILE, id, LINK, name, shortName, type, UNKNOWN`

Constructor Summary
`HDF5Datatype()` Construct an HDF5Datatype
`HDF5Datatype(int datatype_class, int size)` Creates a new HDF5Datatype
`HDF5Datatype(int loc_id, String type_name)` Opens a named HDF5Datatype

Method Summary
`Object` `defineData(long[] count)` define the data with specified data type.
`protected void` `finalize()` finalize() is called by the garbage collector on the object when garbage collection determines that there are no more references to the object.
`int` `get_class()` Returns the datatype class identifier
`int` `get_size()` Returns the size of a datatype in bytes
`static String` `getDatatype(int data_type)` Gets the string representation of the data type
`int` `H5Tcommit(int loc_id, String type_name)` H5Tcommit commits a transient datatype to a file, turned it into a named datatype.

Methods inherited from class visad.data.hdf5.hdf5objects.HDF5Object
`getDescription, getID, getName, getShortName, getType, init, setID, setShortName, setType, toString`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HDF5Datatype

    public HDF5Datatype()

  Construct an HDF5Datatype

### HDF5Datatype

    public HDF5Datatype(int datatype_class,
                        int size)

  Creates a new HDF5Datatype

Parameters:
  `datatype_class` - Class of datatype to create.
  `size` - The number of bytes in the datatype to create.

### HDF5Datatype

    public HDF5Datatype(int loc_id,
                        String type_name)

  Opens a named HDF5Datatype

Parameters:
  `loc_id` - A file, group, or datatype identifier.
  `type_name` - A datatype name.

Method Detail

### H5Tcommit

    public int H5Tcommit(int loc_id,
                         String type_name)
                  throws HDF5LibraryException,
                         NullPointerException

  H5Tcommit commits a transient datatype to a file, turned it into a named datatype.

  Parameters:
    `loc_id` - A file or group identifier.
    `type_name` - A datatype name.
  Returns:
    a non-negative value if successful; otherwise returns a negative value.
  Throws:
    `HDF5LibraryException`
    `NullPointerException`

### get_class

    public int get_class()
                  throws HDF5LibraryException

  Returns the datatype class identifier

  Throws:
    `HDF5LibraryException`

### get_size

    public int get_size()
                 throws HDF5LibraryException

  Returns the size of a datatype in bytes

  Throws:
    `HDF5LibraryException`

### defineData

    public Object defineData(long[] count)
                      throws HDF5Exception

  define the data with specified data type. The maximum selected data size is limited to Integer.MAX_VALUE, which is 2,147,483,647 bytes

  Parameters:
    `count` - the number of points of data
  Throws:
    `HDF5Exception`

### getDatatype

    public static String getDatatype(int data_type)

  Gets the string representation of the data type

  Returns:
    the string of the data type

### finalize

    protected void finalize()
                     throws Throwable

  finalize() is called by the garbage collector on the object when garbage collection determines that there are no more references to the object. It is used to dispose of system resources or to perform other cleanup as C++ destructors

  Throws:
    `Throwable`