NeXusJavaBindings  1
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
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

Public Member Functions

 HDFArray (Object anArray) throws HDFException
 
byte[] emptyBytes () throws HDFException
 allocate a one-dimensional array of bytes sufficient to store the array. More...
 
byte[] byteify () throws HDFException
 Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order. More...
 
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. More...
 

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.

References ncsa.hdf.hdflib.HDFNativeData.byteToDouble(), ncsa.hdf.hdflib.HDFNativeData.byteToFloat(), ncsa.hdf.hdflib.HDFNativeData.byteToInt(), ncsa.hdf.hdflib.HDFNativeData.byteToLong(), and ncsa.hdf.hdflib.HDFNativeData.byteToShort().

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

Here is the call graph for this function:

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.

References ncsa.hdf.hdflib.HDFNativeData.doubleToByte(), ncsa.hdf.hdflib.HDFNativeData.floatToByte(), ncsa.hdf.hdflib.HDFNativeData.intToByte(), ncsa.hdf.hdflib.HDFNativeData.longToByte(), and ncsa.hdf.hdflib.HDFNativeData.shortToByte().

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

Here is the call graph for this function:

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: