Logo Search packages:      
Sourcecode: jhdf version File versions  Download package

static synchronized int ncsa::hdf::hdf5lib::H5::H5Awrite ( int  attr_id,
int  mem_type_id,
Object  obj 
) throws HDF5Exception, NullPointerException [inline, static]

H5Awrite writes an attribute, specified with attr_id. The attribute's memory datatype is specified with mem_type_id. The entire attribute is written from data object to the file.

attr_id IN: Identifier of an attribute to write.
mem_type_id IN: Identifier of the attribute datatype (in memory).
obj IN: Data object to be written.
a non-negative value if successful
HDF5LibraryException - Error from the HDF-5 Library.
NullPointerException - data object is null. See public synchronized static native int H5Awrite(int attr_id, int mem_type_id, byte[] buf);

Definition at line 539 of file H5.java.

References ncsa::hdf::hdf5lib::HDFArray::byteify(), and H5Awrite().

        HDFArray theArray = new HDFArray(obj);
        byte[] buf = theArray.byteify();

        int retVal = H5Awrite(attr_id, mem_type_id, buf);
        buf = null;
        theArray = null;
        return retVal;

Generated by  Doxygen 1.6.0   Back to index