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

static synchronized int ncsa::hdf::hdf5lib::H5::H5Gget_obj_info_idx ( int  loc_id,
String  name,
int  idx,
String[]  oname,
int[]  type 
) throws HDF5LibraryException, NullPointerException [inline, static]

H5Gget_obj_info_idx report the name and type of object with index 'idx' in a Group. The 'idx' corresponds to the index maintained by H5Giterate. Each link is returned, so objects with multiple links will be counted once for each link.

Parameters:
loc_id IN: file or group ID.
name IN: name of the group to iterate, relative to the loc_id
idx IN: the index of the object to iterate.
oname the name of the object [OUT]
type the type of the object [OUT]
Returns:
non-negative if successful, -1 if not.
Exceptions:
HDF5LibraryException - Error from the HDF-5 Library.
NullPointerException - name is null.

Definition at line 4233 of file H5.java.

References H5Gget_objname_by_idx(), H5Gget_objtype_by_idx(), and H5Gopen().

    {
        long default_buf_size = 4096;
        String n[] = new String[1];
        n[0] = new String("");
        int grp_id = H5Gopen(loc_id, name);
        long val = H5Gget_objname_by_idx(grp_id, idx, n, default_buf_size);
        int type_code = H5Gget_objtype_by_idx(grp_id, idx);
        oname[0] = new String(n[0]);
        type[0] = type_code;
        int ret = (new Long(val)).intValue();
        return ret;
    }


Generated by  Doxygen 1.6.0   Back to index