Class HDF5Datatype
- java.lang.Object
-
- visad.data.hdf5.hdf5objects.HDF5Object
-
- visad.data.hdf5.hdf5objects.HDF5Datatype
-
- All Implemented Interfaces:
- java.io.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
-
-
Constructor Summary
Constructors Constructor and Description HDF5Datatype()Construct an HDF5DatatypeHDF5Datatype(int datatype_class, int size)Creates a new HDF5DatatypeHDF5Datatype(int loc_id, java.lang.String type_name)Opens a named HDF5Datatype
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.ObjectdefineData(long[] count)define the data with specified data type.intget_class()Returns the datatype class identifierintget_size()Returns the size of a datatype in bytesstatic java.lang.StringgetDatatype(int data_type)Gets the string representation of the data typeintH5Tcommit(int loc_id, java.lang.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
-
-
-
-
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, java.lang.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, java.lang.String type_name) throws ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException, java.lang.NullPointerExceptionH5Tcommit 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:
ncsa.hdf.hdf5lib.exceptions.HDF5LibraryExceptionjava.lang.NullPointerException
-
get_class
public int get_class() throws ncsa.hdf.hdf5lib.exceptions.HDF5LibraryExceptionReturns the datatype class identifier- Throws:
ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException
-
get_size
public int get_size() throws ncsa.hdf.hdf5lib.exceptions.HDF5LibraryExceptionReturns the size of a datatype in bytes- Throws:
ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException
-
defineData
public java.lang.Object defineData(long[] count) throws ncsa.hdf.hdf5lib.exceptions.HDF5Exceptiondefine 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:
ncsa.hdf.hdf5lib.exceptions.HDF5Exception
-
getDatatype
public static java.lang.String getDatatype(int data_type)
Gets the string representation of the data type- Parameters:
data_type- the type of the data.- Returns:
- the string of the data type
-
-
DMelt 3.0 © DataMelt by jWork.ORG