NeXusJavaBindings  1
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions
ncsa.hdf.hdflib.HDFArray Class Reference

This is a class for handling multidimensional arrays for HDF. More...

Collaboration diagram for ncsa.hdf.hdflib.HDFArray:
Collaboration graph

List of all members.

Public Member Functions

 HDFArray (Object anArray) throws HDFException
byte[] emptyBytes () throws HDFException
 allocate a one-dimensional array of bytes sufficient to store the array.
byte[] byteify () throws HDFException
 Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order.
Object arrayify (byte[] bytes) throws HDFException
 Given a one-dimensional array of numbers, convert it to a java array of the shape and size passed to the constructor.

Detailed Description

This is a class for handling multidimensional arrays for HDF.

The purpose is to allow the storage and retrieval of arbitrary array types containing scientific data.

The methods support the conversion of an array to and from Java to a one-dimensional array of bytes suitable for I/O by the C library.

This class heavily uses the HDFNativeData class to convert between Java and C representations.

Definition at line 29 of file HDFArray.java.


Constructor & Destructor Documentation

ncsa.hdf.hdflib.HDFArray.HDFArray ( Object  anArray) throws HDFException

Definition at line 35 of file HDFArray.java.


Member Function Documentation

Object ncsa.hdf.hdflib.HDFArray.arrayify ( byte[]  bytes) throws HDFException

Given a one-dimensional array of numbers, convert it to a java array of the shape and size passed to the constructor.

Exceptions:
ncsa.hdf.hdflib.HDFExceptionthrown for errors: object not an array: HDFJavaException

Definition at line 271 of file HDFArray.java.

Referenced by org.nexusformat.NexusFile.getattr(), org.nexusformat.NexusFile.getdata(), and org.nexusformat.NexusFile.getslab().

byte [] ncsa.hdf.hdflib.HDFArray.byteify ( ) throws HDFException

Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order.

Exceptions:
ncsa.hdf.hdflib.HDFExceptionthrown for errors: object is not array: HDFJavaException

Definition at line 94 of file HDFArray.java.

Referenced by org.nexusformat.NexusFile.putattr(), org.nexusformat.NexusFile.putdata(), and org.nexusformat.NexusFile.putslab().

byte [] ncsa.hdf.hdflib.HDFArray.emptyBytes ( ) throws HDFException

allocate a one-dimensional array of bytes sufficient to store the array.

Exceptions:
HDFException.

Definition at line 67 of file HDFArray.java.

Referenced by org.nexusformat.NexusFile.getattr(), org.nexusformat.NexusFile.getdata(), and org.nexusformat.NexusFile.getslab().


The documentation for this class was generated from the following file: