Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF  4.3.0
API Reference
 
Loading...
Searching...
No Matches
HDFLibrary Class Reference

Detailed Description

This is the Java interface for the HDF 4.2 library.

This code is the called by Java programs to access the entry points of the HDF 4.2 library. Each routine wraps a single HDF entry point, generally with the arguments and return codes analogous to the C interface.


These routines use the class HDFArray to handle arrays of arbitrary type and shape.


Mapping of arguments for Java

In general, arguments to the HDF Java API are straightforward translations from the 'C' API described in the HDF Reference Manual.

C types to Java types
C Java
int, intn, int32, uint32 int
short, uint16, int16 short
float, float32 float
double, float64 double
char, uchar, int8, uint8 byte
char * (i.e., string) java.lang.String
void void
void *, void *, char * (meaning `‘any’') Special – see HDFArray

General Rules for Passing Arguments and Results

In general, arguments passed IN to Java are the analogous basic types, as above. The exception is for arrays, which are discussed below.

The return value of Java methods is also the analogous type, as above. A major exception to that rule is that all HDF functions that return SUCCEED/FAIL are declared boolean in the Java version, rather than intn or whatever. (Functions that return a value or else FAIL are declared the equivalent to the C function.)

Java does not support pass by reference of arguments, so arguments that are returned through OUT parameters must be wrapped in an object or array. The Java API for HDF consistently wraps arguments in arrays.

For instance, a function that returns two integers is declared:

      void HDFdummy( int32* a1, int32* a2)

For the Java interface, this would be declared:

public static native void HDFdummy(int args[]);

where a1 is args[0] and a2 is args[1].

All the routines where this convention is used will have specific documentation of the details, given below.

Arrays

HDF needs to read and write multi-dimensional arrays of many types. The HDF API is self-describing, with the data for the array passed as a block of bytes, for instance,

     int SDreaddata(int sdsid, int32 *start, int32 * stride,
            int32 *count, void * data);

<p<blockquote>‍

The data parameter may be any valid numeric type, and is a contiguous block of bytes that is the data for a multi-dimensional array.

For Java, this is a problem, as the type of data must be declared. Furthermore, multidimensional arrays are definitely not laid out contiguously in memory. It would be infeasible to declare a separate routine for every combination of number type and dimensionality. For that reason, the HDFArray class is used to discover the type, shape, and size of the data array at run time, and to convert to and from contiguous bytes. The upshot is that the data can be passed as an `‘Object’', and the Java API will translate to and from the appropriate bytes. So the function above would be declared:

int SDreaddata(int sdsid, int[] start, int[] stride, int[] count, Object data);

and the parameter data can be any multi-dimensional array of numbers, such as float[][], or int[][][]. Compression and Chunk Information

The HDF library passes the parameters needed by compression and chunking through C structures (actually, unions). The Java interface passes these as instances of subclasses of class HDFCompInfo and HDFChunkInfo respectively.

See: hdf.hdflib.HDFChunkInfo, and

hdf.hdflib.HDFCompInfo.


+ Inheritance diagram for HDFLibrary:

Static Public Member Functions

static void loadH4Lib ()
 
static final String getJHIVersion ()
 
static long Hopen (String filename) throws HDFException
 
static long Hopen (String filename, int access) throws HDFException
 
static native long Hopen (String filename, int access, int ndds) throws HDFException
 
static native boolean Hclose (long fid) throws HDFException
 
static native int HDdont_atexit () throws HDFException
 
static native boolean Hishdf (String fileName) throws HDFException
 
static int Hnumber (long fid) throws HDFException
 
static native int Hnumber (long fid, int tagtype) throws HDFException
 
static native int DFKNTsize (long numbertype) throws HDFException
 
static native String HDgetNTdesc (int nt) throws HDFException
 
static native boolean Hcache (long file_id, int cache_switch) throws HDFException
 
static native boolean Hgetfileversion (long file_id, int[] vers, String[] string) throws HDFException
 
static native boolean Hgetlibversion (int[] vers, String[] string) throws HDFException
 
static native boolean Hsetaccesstype (long h_id, int access_type) throws HDFException
 
static native boolean Hsync (long file_id) throws HDFException
 
static native int ANstart (long fid) throws HDFException
 
static native boolean ANend (long an_id) throws HDFException
 
static native boolean ANendaccess (long an_id) throws HDFException
 
static native boolean ANfileinfo (long an_id, int[] info) throws HDFException
 
static native int ANselect (long an_id, int index, int anntype) throws HDFException
 
static native int ANnumann (long an_id, int anntype, short tag, short ref) throws HDFException
 
static native short ANatype2tag (int antag) throws HDFException
 
static native int ANtag2atype (short anttype) throws HDFException
 
static native int ANannlist (long an_id, int anntype, short tag, short ref, int[] ann_list) throws HDFException
 
static native int ANannlen (long ann_id) throws HDFException
 
static native boolean ANreadann (long ann_id, String[] annbuf, int maxlen) throws HDFException
 
static native int ANcreate (long an_id, short tag, short ref, int type) throws HDFException
 
static native int ANcreatef (long an_id, int type) throws HDFException
 
static native int ANget_tagref (long an_id, int index, int type, short[] tagref) throws HDFException
 
static native boolean ANid2tagref (long an_id, short[] tagref) throws HDFException
 
static native long ANtagref2id (long an_id, short tag, short ref) throws HDFException
 
static native boolean ANwriteann (long ann_id, String label, int ann_length) throws HDFException
 
static native boolean DFPaddpal (String filename, byte[] palette) throws HDFException
 
static native boolean DFPgetpal (String filename, byte[] palette) throws HDFException
 
static native short DFPlastref () throws HDFException
 
static native int DFPnpals (String filename) throws HDFException
 
static native boolean DFPputpal (String filename, byte[] palette, int overwrite, String filemode) throws HDFException
 
static boolean DFPputpal (String filename, byte[] palette, boolean overwrite, String filemode) throws HDFException
 
static native boolean DFPreadref (String filename, short ref) throws HDFException
 
static native short DFPrestart () throws HDFException
 
static native boolean DFPwriteref (String filename, short ref) throws HDFException
 
static native int GRstart (long fid) throws HDFException
 
static native boolean GRend (long grid) throws HDFException
 
static native boolean GRfileinfo (long grid, int[] args) throws HDFException
 
static native boolean GRgetchunkinfo (long sdsid, HDFChunkInfo chunk_def, int[] flag) throws HDFException
 
static native int GRselect (long grid, int index) throws HDFException
 
static native int GRnametoindex (long grid, String name) throws HDFException
 
static native boolean GRgetiminfo (long grid, String[] gr_name, int[] args, int[] dim_sizes) throws HDFException
 
static native boolean GRreadimage (long grid, int[] start, int[] stride, int[] count, byte[] data) throws HDFException
 
static boolean GRreadimage (long grid, int[] start, int[] stride, int[] count, Object theData) throws HDFException
 
static native boolean GRendaccess (long riid) throws HDFException
 
static native short GRidtoref (long riid) throws HDFException
 
static native int GRreftoindex (long grid, short ref) throws HDFException
 
static native boolean GRreqlutil (long riid, int interlace) throws HDFException
 
static native boolean GRreqimageil (long rrid, int interlace) throws HDFException
 
static native int GRgetlutid (long rrid, int index) throws HDFException
 
static native int GRgetnluts (long rrid) throws HDFException
 
static native boolean GRgetlutinfo (long lutid, int[] args) throws HDFException
 
static native boolean GRreadlut (long lutid, byte[] data) throws HDFException
 
static boolean GRreadlut (long lutid, Object theData) throws HDFException
 
static native boolean GRattrinfo (long id, int index, String[] name, int[] argv) throws HDFException
 
static native boolean GRgetattr (long id, int index, byte[] data) throws HDFException
 
static boolean GRgetattr (long id, int index, Object theData) throws HDFException
 
static native int GRfindattr (long id, String name) throws HDFException
 
static native int GRcreate (long gr_id, String name, int ncomp, long data_type, int interlace_mode, int[] dim_sizes) throws HDFException
 
static native short GRluttoref (long pal_id) throws HDFException
 
static native boolean GRsetattr (long gr_id, String attr_name, long data_type, int count, String values) throws HDFException
 
static native boolean GRsetattr (long gr_id, String attr_name, long data_type, int count, byte[] values) throws HDFException
 
static boolean GRsetattr (long gr_id, String attr_name, long data_type, int count, Object theData) throws HDFException
 
static native boolean GRsetchunk (long sdsid, HDFChunkInfo chunk_def, int flags) throws HDFException
 
static native int GRsetchunkcache (long sdsid, int maxcache, int flags) throws HDFException
 
static native boolean GRsetcompress (long ri_id, int comp_type, HDFCompInfo c_info) throws HDFException
 
static native boolean GRgetcompress (long ri_id, HDFCompInfo c_info) throws HDFException
 
static native boolean GRgetcompinfo (long ri_id, HDFCompInfo c_info) throws HDFException
 
static native boolean GRsetexternalfile (long ri_id, String filename, int offset) throws HDFException
 
static native boolean GRwriteimage (long grid, int[] start, int[] stride, int[] edge, byte[] data) throws HDFException
 
static boolean GRwriteimage (long grid, int[] start, int[] stride, int[] edge, Object theData) throws HDFException
 
static native boolean GRwritelut (long pal_id, int ncomp, int data_type, int interlace, int num_entries, byte[] pal_data) throws HDFException
 
static boolean GRwritelut (long pal_id, int ncomp, int data_type, int interlace, int num_entries, Object theData) throws HDFException
 
static native boolean GRreadchunk (long sdsid, int[] origin, byte[] theData) throws HDFException
 
static boolean GRreadchunk (long grid, int[] origin, Object theData) throws HDFException
 
static native boolean HDFclose (long file_id) throws HDFException
 
static native long HDFopen (String filename, int access, short n_dds) throws HDFException
 
static native short HEvalue (int level) throws HDFException
 
static native String HEstring (int error_code) throws HDFException
 
static native void HEprint (Object stream, int level) throws HDFException
 
static native boolean HXsetcreatedir (String dir) throws HDFException
 
static native boolean HXsetdir (String dir) throws HDFException
 
static native long SDstart (String filename, int accessmode) throws HDFException
 
static native boolean SDend (long sdid) throws HDFException
 
static native boolean SDfileinfo (long sdid, int[] argv) throws HDFException
 
static native long SDselect (long sdid, int index) throws HDFException
 
static native int SDnametoindex (long sdid, String name) throws HDFException
 
static native boolean SDgetinfo (long sdsid, String[] name, int[] dimsizes, int[] args) throws HDFException
 
static native boolean SDcheckempty (long sdsid, int[] emptySDS) throws HDFException
 
static native boolean SDreaddata (long sdsid, int[] start, int[] stride, int[] count, byte[] data) throws HDFException
 
static boolean SDreaddata (long sdsid, int[] start, int[] stride, int[] count, Object theData) throws HDFException
 
static native boolean SDreaddata_short (long sdsid, int[] start, int[] stride, int[] count, short[] theData) throws HDFException
 
static native boolean SDreaddata_int (long sdsid, int[] start, int[] stride, int[] count, int[] theData) throws HDFException
 
static native boolean SDreaddata_long (long sdsid, int[] start, int[] stride, int[] count, long[] theData) throws HDFException
 
static native boolean SDreaddata_float (long sdsid, int[] start, int[] stride, int[] count, float[] theData) throws HDFException
 
static native boolean SDreaddata_double (long sdsid, int[] start, int[] stride, int[] count, double[] theData) throws HDFException
 
static native boolean SDendaccess (long sdsid) throws HDFException
 
static native long SDgetdimid (long sdsid, int index) throws HDFException
 
static native boolean SDdiminfo (long dimid, String[] name, int[] argv) throws HDFException
 
static native int SDidtoref (long sdsid) throws HDFException
 
static native int SDreftoindex (long sdid, int ref) throws HDFException
 
static native boolean SDattrinfo (long id, int index, String[] name, int[] argv) throws HDFException
 
static native boolean SDreadattr (long id, int index, byte[] data) throws HDFException
 
static boolean SDreadattr (long id, int index, Object theData) throws HDFException
 
static native long SDfindattr (long id, String name) throws HDFException
 
static native boolean SDiscoordvar (long sdsid) throws HDFException
 
static native boolean SDgetcal (long sdsid, double[] argv, int[] NT) throws HDFException
 
static native boolean SDgetdatastrs (long sdsid, String[] strings, int len) throws HDFException
 
static native boolean SDgetdimstrs (long dimid, String[] args, int len) throws HDFException
 
static native boolean SDgetdimscale (long dimid, byte[] data) throws HDFException
 
static boolean SDgetdimscale (long dimid, Object theData) throws HDFException
 
static native boolean SDgetfillvalue (long sdsid, byte[] fillValue) throws HDFException
 
static boolean SDgetfillvalue (long sdsid, Object[] theFillValue) throws HDFException
 
static native boolean SDgetrange (long sdsid, byte[] max, byte[] min) throws HDFException
 
static boolean SDgetrange (long sdsid, double maxmin[]) throws HDFException
 
static native long SDcreate (long sd_id, String name, long number_type, int rank, int[] dimsizes) throws HDFException
 
static native boolean SDisrecord (long sdsid) throws HDFException
 
static native boolean SDsetattr (long s_id, String attr_name, long num_type, int count, byte[] values) throws HDFException
 
static boolean SDsetattr (long s_id, String attr_name, long num_type, int count, Object theValues) throws HDFException
 
static native boolean SDsetcal (long sds_id, double cal, double cal_err, double offset, double offset_err, int number_type) throws HDFException
 
static native boolean SDsetdatastrs (long sds_id, String label, String unit, String format, String coordsys) throws HDFException
 
static native boolean SDsetdimname (long dim_id, String dim_name) throws HDFException
 
static native boolean SDsetdimscale (long dim_id, int count, int number_type, byte[] data) throws HDFException
 
static boolean SDsetdimscale (long dim_id, int count, int number_type, Object theData) throws HDFException
 
static native boolean SDsetdimstrs (long dim_id, String label, String unit, String format) throws HDFException
 
static native boolean SDsetexternalfile (long sds_id, String filename, int offset) throws HDFException
 
static native boolean SDsetfillvalue (long sds_id, byte[] fill_val) throws HDFException
 
static boolean SDsetfillvalue (long sds_id, Object the_fill_val) throws HDFException
 
static native boolean SDsetrange (long sdsid, byte[] max, byte[] min) throws HDFException
 
static boolean SDsetrange (long sdsid, Object max, Object min) throws HDFException
 
static native boolean SDwritedata (long sdsid, int[] start, int[] stride, int[] count, byte[] data) throws HDFException
 
static boolean SDwritedata (long sdsid, int[] start, int[] stride, int[] count, Object theData) throws HDFException
 
static native boolean SDsetnbitdataset (long id, int start_bit, int bit_len, int sign_ext, int fill_one) throws HDFException
 
static native boolean SDsetcompress (long id, int type, HDFCompInfo cinfo) throws HDFException
 
static native boolean SDgetcompinfo (long id, HDFCompInfo cinfo) throws HDFException
 
static native boolean SDsetaccesstype (long id, int accesstype) throws HDFException
 
static native boolean SDsetblocksize (long sdsid, int block_size) throws HDFException
 
static boolean SDsetfillmode (long sdsid, boolean fill_enable) throws HDFException
 
static native boolean SDsetfillmode (long sdsid, int fillmode) throws HDFException
 
static native boolean SDsetdimval_comp (long dimid, int comp_mode) throws HDFException
 
static native boolean SDisdimval_bwcomp (long dimid) throws HDFException
 
static native boolean SDsetchunk (long sdsid, HDFChunkInfo chunk_def, int flags) throws HDFException
 
static native boolean SDgetchunkinfo (long sdsid, HDFChunkInfo chunk_def, int[] clflags) throws HDFException
 
static native boolean SDreadchunk (long sdsid, int[] origin, byte[] theData) throws HDFException
 
static boolean SDreadchunk (long sdsid, int[] origin, Object theData) throws HDFException
 
static native int SDsetchunkcache (long sdsid, int maxcache, int flags) throws HDFException
 
static native boolean SDwritechunk (long sdsid, int[] origin, byte[] data) throws HDFException
 
static boolean SDwritechunk (long sdsid, int[] origin, Object theData) throws HDFException
 
static native int VFfieldesize (long vdata_id, int field_index) throws HDFException
 
static native int VFfieldisize (long vdata_id, int field_index) throws HDFException
 
static native String VFfieldname (long vdata_id, int field_index) throws HDFException
 
static native int VFfieldorder (long vdata_id, int field_index) throws HDFException
 
static native long VFfieldtype (long vdata_id, int field_index) throws HDFException
 
static native int VFnfields (long vkey) throws HDFException
 
static native int VHmakegroup (long file_id, int[] tag_array, int[] ref_array, int n_objects, String vgroup_name, String vgroup_class) throws HDFException
 
static native int VHstoredata (long file_id, String fieldname, byte[] buf, int n_records, int data_type, String vdata_name, String vdata_class) throws HDFException
 
static int VHstoredata (long file_id, String fieldname, Object thebuf, int n_records, int data_type, String vdata_name, String vdata_class) throws HDFException
 
static native int VHstoredatam (long file_id, String fieldname, byte[] buf, int n_records, int data_type, String vdata_name, String vdata_class, int order) throws HDFException
 
static int VHstoredatam (long file_id, String fieldname, Object buf, int n_records, int data_type, String vdata_name, String vdata_class, int order) throws HDFException
 
static native int VQueryref (long vkey) throws HDFException
 
static native int VQuerytag (long vkey) throws HDFException
 
static native boolean Vstart (long fid) throws HDFException
 
static native int Vattach (long fid, int vgroup_ref, String access) throws HDFException
 
static native void Vdetach (long vgroup_id) throws HDFException
 
static native void Vend (long file_id) throws HDFException
 
static native int Vgetid (long file_id, int vgroup_ref) throws HDFException
 
static native void Vgetclass (long vgroup_id, String[] hdfclassname) throws HDFException
 
static native void Vgetname (long vgroup_id, String[] hdfname) throws HDFException
 
static native boolean Visvg (long vgroup_id, int vgroup_ref) throws HDFException
 
static native boolean Visvs (long vgroup_id, int vdata_ref) throws HDFException
 
static native int Vgettagrefs (long vgroup_id, int[] tags, int[] refs, int arraysize) throws HDFException
 
static native boolean Vgettagref (long vgroup_id, int index, int[] tagref) throws HDFException
 
static native int Vntagrefs (long vgroup_id) throws HDFException
 
static native boolean Vinqtagref (long vgroup_id, int tag, int ref) throws HDFException
 
static native int Vlone (long fid, int[] ref_array, int buffersize) throws HDFException
 
static native int Vaddtagref (long vgroup_id, int tag, int ref) throws HDFException
 
static native int Vdeletetagref (long vgroup_id, int tag, int ref) throws HDFException
 
static native int Vfind (long file_id, String vgroup_name) throws HDFException
 
static native int Vfindclass (long file_id, String vgclassname) throws HDFException
 
static native int Vflocate (int key, String vgclassname) throws HDFException
 
static native int Vgetnext (int key, int ref) throws HDFException
 
static native boolean Vinquire (long vgroup_id, int[] n_entries, String[] vgroup_name) throws HDFException
 
static native int Vinsert (long vgroup_id, long v_id) throws HDFException
 
static native int Vnrefs (int key, int ref) throws HDFException
 
static native boolean Vsetclass (long vgroup_id, String vgclassname) throws HDFException
 
static native boolean Vsetname (long vgroup_id, String vgname) throws HDFException
 
static native boolean Vattrinfo (long id, int index, String[] name, int[] argv) throws HDFException
 
static native long Vfindattr (long id, String name) throws HDFException
 
static native boolean Vgetattr (long id, int index, byte[] data) throws HDFException
 
static boolean Vgetattr (long id, int index, Object theData) throws HDFException
 
static native int Vgetversion (long id) throws HDFException
 
static native int Vnattrs (long id) throws HDFException
 
static native boolean Vsetattr (long id, String attr_name, long data_type, int count, String values) throws HDFException
 
static native boolean Vsetattr (long id, String attr_name, long data_type, int count, byte[] data) throws HDFException
 
static boolean Vsetattr (long id, String attr_name, long data_type, int count, Object theData) throws HDFException
 
static native boolean VSQuerycount (long vdata_id, int[] n_records) throws HDFException
 
static native boolean VSQueryfields (long vdata_id, String[] fields) throws HDFException
 
static native boolean VSQueryinterlace (long vdata_id, int[] interlace) throws HDFException
 
static native boolean VSQueryname (long vdata_id, String[] vdata_name) throws HDFException
 
static native int VSQueryref (long vdata_id) throws HDFException
 
static native int VSQuerytag (long vdata_id) throws HDFException
 
static native boolean VSQueryvsize (long vdata_id, int[] vdata_size) throws HDFException
 
static native int VSattach (long fid, int vdata_ref, String access) throws HDFException
 
static native void VSdetach (long vdata_id) throws HDFException
 
static native long VSgetid (long file_id, int vdata_ref) throws HDFException
 
static native void VSgetclass (long vdata_id, String[] hdfclassname) throws HDFException
 
static native void VSgetname (long vdata_id, String[] hdfname) throws HDFException
 
static native int VSelts (long vdata_id) throws HDFException
 
static native boolean VSfdefine (long vdata_id, String fieldname, int numbertype, int order) throws HDFException
 
static native boolean VSfexist (long vdata_id, String fields) throws HDFException
 
static native int VSfind (long file_id, String vdataname) throws HDFException
 
static native int VSsetblocksize (long vdata_id, int blocksize) throws HDFException
 
static native int VSsetnumblocks (long vdata_id, int numblocks) throws HDFException
 
static native int VSgetfields (long vdata_id, String[] fieldname) throws HDFException
 
static native int VSgetinterlace (long vdata_id) throws HDFException
 
static native boolean VSinquire (long vdata_id, int[] iargs, String[] sargs) throws HDFException
 
static native boolean VSinquire (long vdata_id, int[] iargs) throws HDFException
 
static native int VSlone (long fid, int[] ref_array, int buffersize) throws HDFException
 
static native int VSread (long vdata_id, byte[] databuf, int nrecord, int interlace) throws HDFException
 
static int VSread (long vdata_id, Object theData, int nrecord, int interlace) throws HDFException
 
static native int VSseek (long vdata_id, int record) throws HDFException
 
static native boolean VSsetfields (long vdata_id, String fields) throws HDFException
 
static native boolean VSsetinterlace (long vdata_id, int interlace) throws HDFException
 
static native int VSsizeof (long vdata_id, String fields) throws HDFException
 
static native boolean VSappendable (int vkey, int block_size) throws HDFException
 
static native int VSfindclass (long file_id, String vgclass) throws HDFException
 
static native int VSgetversion (int vkey) throws HDFException
 
static native void VSsetclass (long vdata_id, String vdata_class) throws HDFException
 
static native boolean VSsetexternalfile (int vkey, String filename, int offset) throws HDFException
 
static native void VSsetname (long vdata_id, String vdata_name) throws HDFException
 
static native int VSwrite (long vdata_id, byte[] databuf, int n_records, int interlace) throws HDFException
 
static int VSwrite (long vdata_id, Object databuf, int n_records, int interlace) throws HDFException
 
static native boolean VSattrinfo (long id, int index, int attr_index, String[] name, int[] argv) throws HDFException
 
static native int VSfindex (long id, String name, int[] findex) throws HDFException
 
static native int VSfindattr (long id, int index, String name) throws HDFException
 
static native int VSfnattrs (long id, int fnattrs) throws HDFException
 
static native boolean VSgetattr (long id, int index, int attr_index, byte[] data) throws HDFException
 
static boolean VSgetattr (long id, int index, int attr_index, Object theData) throws HDFException
 
static native boolean VSisattr (long id) throws HDFException
 
static native int VSnattrs (long id) throws HDFException
 
static native boolean VSsetattr (long id, int index, String attr_name, long data_type, int count, String values) throws HDFException
 
static native boolean VSsetattr (long id, int index, String attr_name, long data_type, int count, byte[] values) throws HDFException
 
static boolean VSsetattr (long id, int index, String attr_name, long data_type, int count, Object theData) throws HDFException
 
static native boolean DF24getdims (String fileName, int[] argv) throws HDFException
 
static native boolean DF24reqil (int il) throws HDFException
 
static native boolean DF24getimage (String fileName, byte[] imagedata, int width, int height) throws HDFException
 
static boolean DF24getimage (String fileName, Object theImagedata, int width, int height) throws HDFException
 
static native short DF24lastref () throws HDFException
 
static native boolean DF24restart () throws HDFException
 
static native boolean DF24readref (String filename, int ref) throws HDFException
 
static native int DF24nimages (String fileName) throws HDFException
 
static native boolean DF24addimage (String filename, byte[] image, int width, int height) throws HDFException
 
static boolean DF24addimage (String filename, Object theImage, int width, int height) throws HDFException
 
static native boolean DF24putimage (String filename, byte[] image, int width, int height) throws HDFException
 
static boolean DF24putimage (String filename, Object theImage, int width, int height) throws HDFException
 
static native boolean DF24setcompress (int type, HDFCompInfo cinfo) throws HDFException
 
static native boolean DF24setdims (int width, int height) throws HDFException
 
static native boolean DF24setil (int il) throws HDFException
 
static native boolean DFR8getdims (String fileName, int[] argv, boolean[] haspalette) throws HDFException
 
static native boolean DFR8getimage (String fileName, byte[] imagedata, int width, int height, byte[] palette) throws HDFException
 
static boolean DFR8getimage (String fileName, Object theImagedata, int width, int height, byte[] palette) throws HDFException
 
static native short DFR8lastref () throws HDFException
 
static native boolean DFR8restart () throws HDFException
 
static native boolean DFR8readref (String filename, int ref) throws HDFException
 
static native int DFR8nimages (String fileName) throws HDFException
 
static native boolean DFR8addimage (String filename, byte[] image, int width, int height, short compress) throws HDFException
 
static boolean DFR8addimage (String filename, Object theImage, int width, int height, short compress) throws HDFException
 
static native boolean DFR8putimage (String filename, byte[] image, int width, int height, short compress) throws HDFException
 
static boolean DFR8putimage (String filename, Object theImage, int width, int height, short compress) throws HDFException
 
static native boolean DFR8setcompress (int type, HDFCompInfo cinfo) throws HDFException
 
static native boolean DFR8getpalref (short[] palref) throws HDFException
 
static native boolean DFR8setpalette (byte[] palette) throws HDFException
 
static native boolean DFR8writeref (String filename, short ref) throws HDFException
 
static native int HCget_config_info (int coder_type) throws HDFException
 

Static Public Attributes

static final String HDFPATH_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.hdflib"
 
static final String H4_LIBRARY_NAME_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.loadLibraryName"
 

Member Function Documentation

◆ ANannlen()

static native int ANannlen ( long ann_id) throws HDFException
static

◆ ANannlist()

static native int ANannlist ( long an_id,
int anntype,
short tag,
short ref,
int[] ann_list ) throws HDFException
static
Parameters
an_idIN: the AN interface id, returned by ANstart
anntypeIN: the number type, as defined in HDFConstants
tagIN: the HDF tag
refIN: the HDF ref
ann_listOUT: int[], an array of annotation identifiers. The array must be long enough to hold the number of annotations returned by ANnumann
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
an array of integers, which are the identifiers of the annotations

◆ ANatype2tag()

static native short ANatype2tag ( int antag) throws HDFException
static

◆ ANcreate()

static native int ANcreate ( long an_id,
short tag,
short ref,
int type ) throws HDFException
static

◆ ANcreatef()

static native int ANcreatef ( long an_id,
int type ) throws HDFException
static

◆ ANend()

static native boolean ANend ( long an_id) throws HDFException
static

◆ ANendaccess()

static native boolean ANendaccess ( long an_id) throws HDFException
static

◆ ANfileinfo()

static native boolean ANfileinfo ( long an_id,
int[] info ) throws HDFException
static
Parameters
an_idIN: the AN interface id, returned by ANstart
infoOUT: int[4], n_file_label, n_file_desc, n_data_label, n_data_desc
Returns
four integer parameters: info[0] = n_file_label, info[1] = n_file_desc, info[2] = n_data_label, info[3] = n_data_desc
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

◆ ANget_tagref()

static native int ANget_tagref ( long an_id,
int index,
int type,
short[] tagref ) throws HDFException
static
Parameters
an_idIN: the AN interface id, returned by ANstart
indexIN: the index of the annotation
typeIN: the type of the annotation
tagrefOUT: short[2], the tag and ref of the annotation
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the tag and ref: tagref[0] = tag, tagref[1] = ref

◆ ANid2tagref()

static native boolean ANid2tagref ( long an_id,
short[] tagref ) throws HDFException
static
Parameters
an_idIN: the AN interface id, returned by ANstart
tagrefOUT: short[2], the tag and ref of the annotation
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the tag and ref: tagref[0] = tag, tagref[1] = ref

◆ ANnumann()

static native int ANnumann ( long an_id,
int anntype,
short tag,
short ref ) throws HDFException
static

◆ ANreadann()

static native boolean ANreadann ( long ann_id,
String[] annbuf,
int maxlen ) throws HDFException
static
Parameters
ann_idIN: the AN interface id, returned by ANstart
annbufOUT: String[1], the annotation is returned as annbuf[0].
maxlenIN: int, the maximum length of the string.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
an annotation string: annbuf[0] = the annotation

◆ ANselect()

static native int ANselect ( long an_id,
int index,
int anntype ) throws HDFException
static

◆ ANstart()

static native int ANstart ( long fid) throws HDFException
static

◆ ANtag2atype()

static native int ANtag2atype ( short anttype) throws HDFException
static

◆ ANtagref2id()

static native long ANtagref2id ( long an_id,
short tag,
short ref ) throws HDFException
static

◆ ANwriteann()

static native boolean ANwriteann ( long ann_id,
String label,
int ann_length ) throws HDFException
static

◆ DF24addimage() [1/2]

static native boolean DF24addimage ( String filename,
byte[] image,
int width,
int height ) throws HDFException
static
Parameters
filenameIN: String, the file
imageIN: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write from a Java array use the alternative routine below.
Returns
true on success

◆ DF24addimage() [2/2]

static boolean DF24addimage ( String filename,
Object theImage,
int width,
int height ) throws HDFException
static
Parameters
filenameIN: String, the file
theImageIN: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data into a contiguous array of bytes and then writes it
           to the file
Returns
true on success

◆ DF24getdims()

static native boolean DF24getdims ( String fileName,
int[] argv ) throws HDFException
static
Parameters
fileNameIN: String, the file
argvOUT: int[3], the width, height, and interlace mode
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
argv[0] = width, argv[1] = height, argv[2] = interlace

◆ DF24getimage() [1/2]

static native boolean DF24getimage ( String fileName,
byte[] imagedata,
int width,
int height ) throws HDFException
static
Parameters
fileNameIN: String, the file
imagedataOUT: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to read into a Java array use the alternative routine below.
Returns
data = the image in an array of bytes

◆ DF24getimage() [2/2]

static boolean DF24getimage ( String fileName,
Object theImagedata,
int width,
int height ) throws HDFException
static
Parameters
fileNameIN: String, the file
theImagedataOUT: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> reads the data as a contiguous array of bytes and then converts it to
           an appropriate Java object.
Returns
data = the value of the attribute, in an array of Java objects

◆ DF24lastref()

static native short DF24lastref ( ) throws HDFException
static

◆ DF24nimages()

static native int DF24nimages ( String fileName) throws HDFException
static

◆ DF24putimage() [1/2]

static native boolean DF24putimage ( String filename,
byte[] image,
int width,
int height ) throws HDFException
static
Parameters
filenameIN: String, the file
imageIN: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write from a Java array use the alternative routine below.
Returns
true on success

◆ DF24putimage() [2/2]

static boolean DF24putimage ( String filename,
Object theImage,
int width,
int height ) throws HDFException
static
Parameters
filenameIN: String, the file
theImageIN: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data into a contiguous array of bytes and then writes it
           to the file
Returns
true on success

◆ DF24readref()

static native boolean DF24readref ( String filename,
int ref ) throws HDFException
static

◆ DF24reqil()

static native boolean DF24reqil ( int il) throws HDFException
static

◆ DF24restart()

static native boolean DF24restart ( ) throws HDFException
static

◆ DF24setcompress()

static native boolean DF24setcompress ( int type,
HDFCompInfo cinfo ) throws HDFException
static
Parameters
typeIN: int, the type of compression
cinfoIN: HDFCompInfo, the compression parameters
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
true on success

◆ DF24setdims()

static native boolean DF24setdims ( int width,
int height ) throws HDFException
static

◆ DF24setil()

static native boolean DF24setil ( int il) throws HDFException
static

◆ DFKNTsize()

static native int DFKNTsize ( long numbertype) throws HDFException
static

◆ DFPaddpal()

static native boolean DFPaddpal ( String filename,
byte[] palette ) throws HDFException
static

◆ DFPgetpal()

static native boolean DFPgetpal ( String filename,
byte[] palette ) throws HDFException
static

◆ DFPlastref()

static native short DFPlastref ( ) throws HDFException
static

◆ DFPnpals()

static native int DFPnpals ( String filename) throws HDFException
static

◆ DFPputpal() [1/2]

static boolean DFPputpal ( String filename,
byte[] palette,
boolean overwrite,
String filemode ) throws HDFException
static
Parameters
filenameIN: String, the name of the HDF file
paletteIN: byte[] the palette
overwriteIN: boolean, converted to 1 == true, 0 == false to call the HDF library
filemodeIN: if "a" append palette to file, "w" create new file
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
true on success

◆ DFPputpal() [2/2]

static native boolean DFPputpal ( String filename,
byte[] palette,
int overwrite,
String filemode ) throws HDFException
static

◆ DFPreadref()

static native boolean DFPreadref ( String filename,
short ref ) throws HDFException
static

◆ DFPrestart()

static native short DFPrestart ( ) throws HDFException
static

◆ DFPwriteref()

static native boolean DFPwriteref ( String filename,
short ref ) throws HDFException
static

◆ DFR8addimage() [1/2]

static native boolean DFR8addimage ( String filename,
byte[] image,
int width,
int height,
short compress ) throws HDFException
static
Parameters
filenameIN: String, the file
imageIN: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
compressIN: short, the type of compression
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write from a Java array use the alternative routine below.
Returns
true on success

◆ DFR8addimage() [2/2]

static boolean DFR8addimage ( String filename,
Object theImage,
int width,
int height,
short compress ) throws HDFException
static
Parameters
filenameIN: String, the file
theImageIN: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
compressIN: short, the type of compression
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data into a contiguous array of bytes and then writes it
           to the file
Returns
true on success

◆ DFR8getdims()

static native boolean DFR8getdims ( String fileName,
int[] argv,
boolean[] haspalette ) throws HDFException
static
Parameters
fileNameIN: String, the file
argvOUT: int[2], the width and height
haspaletteOUT: boolean[1], has a palette
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
argv[0] = width, argv[1] = height, haspalette[0] = palette

◆ DFR8getimage() [1/2]

static native boolean DFR8getimage ( String fileName,
byte[] imagedata,
int width,
int height,
byte[] palette ) throws HDFException
static
Parameters
fileNameIN: String, the file
imagedataOUT: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
paletteOUT: byte[], the color look up table
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to read into a Java array use the alternative routine below.
Returns
data = imagedata: the image in an array of bytes, palette: the look up table, in an array of bytes

◆ DFR8getimage() [2/2]

static boolean DFR8getimage ( String fileName,
Object theImagedata,
int width,
int height,
byte[] palette ) throws HDFException
static
Parameters
fileNameIN: String, the file
theImagedataOUT: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
paletteOUT: byte[], the color look up table
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> reads the data as a contiguous array of bytes and then converts it to
           an appropriate Java object.
Returns
data = theImagedata: the value of the attribute, in an array of Java objects palette: the look up table, in an array of bytes

◆ DFR8getpalref()

static native boolean DFR8getpalref ( short[] palref) throws HDFException
static
Parameters
palrefOUT: short[1], the HDF ref of the palette
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
palref[0] = the ref of the palette

◆ DFR8lastref()

static native short DFR8lastref ( ) throws HDFException
static

◆ DFR8nimages()

static native int DFR8nimages ( String fileName) throws HDFException
static

◆ DFR8putimage() [1/2]

static native boolean DFR8putimage ( String filename,
byte[] image,
int width,
int height,
short compress ) throws HDFException
static
Parameters
filenameIN: String, the file
imageIN: byte[], the image, in an array of bytes
widthIN: int, the width of the image
heightIN: int, the height of the image
compressIN: short, the type of compression
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write from a Java array use the alternative routine below.
Returns
true on success

◆ DFR8putimage() [2/2]

static boolean DFR8putimage ( String filename,
Object theImage,
int width,
int height,
short compress ) throws HDFException
static
Parameters
filenameIN: String, the file
theImageIN: Object, the image, in a java array of appropriate size and type
widthIN: int, the width of the image
heightIN: int, the height of the image
compressIN: short, the type of compression
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data into a contiguous array of bytes and then writes it
           to the file
Returns
true on success

◆ DFR8readref()

static native boolean DFR8readref ( String filename,
int ref ) throws HDFException
static

◆ DFR8restart()

static native boolean DFR8restart ( ) throws HDFException
static

◆ DFR8setcompress()

static native boolean DFR8setcompress ( int type,
HDFCompInfo cinfo ) throws HDFException
static

DFR8setcompress sets compression scheme for 8-bit image

Parameters
typeIN: int, the type of compression
cinfoIN: HDFCompInfo, the compression parameters
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
true on success

◆ DFR8setpalette()

static native boolean DFR8setpalette ( byte[] palette) throws HDFException
static

◆ DFR8writeref()

static native boolean DFR8writeref ( String filename,
short ref ) throws HDFException
static

◆ getJHIVersion()

static final String getJHIVersion ( )
static

◆ GRattrinfo()

static native boolean GRattrinfo ( long id,
int index,
String[] name,
int[] argv ) throws HDFException
static
Parameters
idIN: the GR identifier returned by GRstart
indexIN: the index of the attribute
nameOUT: String[1], the name of the attribute
argvOUT: int[2], the type and length of the attribute
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the name, type, and length of the attribute: name[0] = name, argv[0] = data_type, argv[1] = length

◆ GRcreate()

static native int GRcreate ( long gr_id,
String name,
int ncomp,
long data_type,
int interlace_mode,
int[] dim_sizes ) throws HDFException
static

◆ GRend()

static native boolean GRend ( long grid) throws HDFException
static

◆ GRendaccess()

static native boolean GRendaccess ( long riid) throws HDFException
static

◆ GRfileinfo()

static native boolean GRfileinfo ( long grid,
int[] args ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
argsOUT: int[2], n_datasets and n_file_attrs
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the file info: args[0] = n_datasets, args[1] = n_file_attrs

◆ GRfindattr()

static native int GRfindattr ( long id,
String name ) throws HDFException
static

◆ GRgetattr() [1/2]

static native boolean GRgetattr ( long id,
int index,
byte[] data ) throws HDFException
static
Parameters
idIN: the GR identifier returned by GRstart
indexIN: index of the attribute for info
dataOUT: byte[], attribute data, in bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the attribute data: as bytes
    <p>
    <b>NOTE:</b> to read into a Java 1D array use the alternative routine below.

◆ GRgetattr() [2/2]

static boolean GRgetattr ( long id,
int index,
Object theData ) throws HDFException
static
Parameters
idIN: the GR identifier returned by GRstart
indexIN: index of the attribute for info
theDataOUT: Object, attribute data, an Java array
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the attribute data: as a Java array
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ GRgetchunkinfo()

static native boolean GRgetchunkinfo ( long sdsid,
HDFChunkInfo chunk_def,
int[] flag ) throws HDFException
static
Parameters
sdsidIN: the SD identifier returned by SDselect
chunk_defOUT: HDFChunkInfo, the chunking info
flagOUT: int[1], the type of chunking
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
c_info contains information about the chunking method, flags[0] == the chunking flags
    <p>
    <b>NOTE:</b>The chunking algorithm-specific information is passed in an appropriate
    sub-class of HDFChunkInfo.

◆ GRgetcompinfo()

static native boolean GRgetcompinfo ( long ri_id,
HDFCompInfo c_info ) throws HDFException
static

◆ GRgetcompress()

static native boolean GRgetcompress ( long ri_id,
HDFCompInfo c_info ) throws HDFException
static

◆ GRgetiminfo()

static native boolean GRgetiminfo ( long grid,
String[] gr_name,
int[] args,
int[] dim_sizes ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
gr_nameOUT: name of raster image
argsOUT: int[4], image info: number of components in the image, data type of the image data, interlace mode of the stored image data, number of attributes assigned to the image
dim_sizesOUT: int[2], dim_sizes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the file info: String[0] = gr_name, args[0] = ncomp, args[1] = data_type, args[2] = interlace, args[3] = num_attrs

NOTE: the parameters for the Java interface are not in the same order as the C interface.

◆ GRgetlutid()

static native int GRgetlutid ( long rrid,
int index ) throws HDFException
static

◆ GRgetlutinfo()

static native boolean GRgetlutinfo ( long lutid,
int[] args ) throws HDFException
static
Parameters
lutidIN: the palette identifier returned by GRgetlutid
argsOUT: int[4], palette info: Number of components in the palette, Data type of the palette data, Interlace mode of the stored palette data, Number of color lookup table entries in the palette.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the palette info: args[0] = ncomp, args[1] = data_type, args[2] = interlace, args[3] = num_entries

◆ GRgetnluts()

static native int GRgetnluts ( long rrid) throws HDFException
static

◆ GRidtoref()

static native short GRidtoref ( long riid) throws HDFException
static

◆ GRluttoref()

static native short GRluttoref ( long pal_id) throws HDFException
static

◆ GRnametoindex()

static native int GRnametoindex ( long grid,
String name ) throws HDFException
static

◆ GRreadchunk() [1/2]

static boolean GRreadchunk ( long grid,
int[] origin,
Object theData ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by SDselect
originIN: int[], origin
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: reads the data as a contiguous array of bytes and then converts it to an appropriate Java object.

Returns
true on success

◆ GRreadchunk() [2/2]

static native boolean GRreadchunk ( long sdsid,
int[] origin,
byte[] theData ) throws HDFException
static
Parameters
sdsidIN: the GR interface id, returned by SDselect
originIN: int[], origin
theDataOUT: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to read into a Java array use the alternative routine below.

Returns
true on success

◆ GRreadimage() [1/2]

static native boolean GRreadimage ( long grid,
int[] start,
int[] stride,
int[] count,
byte[] data ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
startIN: int[2], start
strideIN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
countIN: int[2], count
dataOUT: byte[], data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into a Java 2D array use the alternative routine below.

◆ GRreadimage() [2/2]

static boolean GRreadimage ( long grid,
int[] start,
int[] stride,
int[] count,
Object theData ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
startIN: int[2], start
strideIN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
countIN: int[2], count
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array.
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ GRreadlut() [1/2]

static native boolean GRreadlut ( long lutid,
byte[] data ) throws HDFException
static
Parameters
lutidIN: the palette identifier returned by GRgetlutid
dataOUT: byte[], palette data, in bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the palette data: as bytes
    <p>
    <b>NOTE:</b> to read into a Java 1D array use the alternative routine below.

◆ GRreadlut() [2/2]

static boolean GRreadlut ( long lutid,
Object theData ) throws HDFException
static
Parameters
lutidIN: the palette identifier returned by GRgetlutid
theDataOUT: Object, palette data, an Java array
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the palette data: as a Java array
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ GRreftoindex()

static native int GRreftoindex ( long grid,
short ref ) throws HDFException
static

◆ GRreqimageil()

static native boolean GRreqimageil ( long rrid,
int interlace ) throws HDFException
static

◆ GRreqlutil()

static native boolean GRreqlutil ( long riid,
int interlace ) throws HDFException
static

◆ GRselect()

static native int GRselect ( long grid,
int index ) throws HDFException
static

◆ GRsetattr() [1/3]

static native boolean GRsetattr ( long gr_id,
String attr_name,
long data_type,
int count,
byte[] values ) throws HDFException
static
Parameters
gr_idIN: the GR identifier returned by GRstart
attr_nameIN: the name of the attribute
data_typeIN: the number type of the data
countIN: the length the data (length of 'values')
valuesIN: the the attribute to write – in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:This routine writes the attribute as an array of bytes. DO NOT USE THIS TO WRITE A STRING. This is intended for numeric data that has been flattened into bytes.

Returns
true on success

◆ GRsetattr() [2/3]

static boolean GRsetattr ( long gr_id,
String attr_name,
long data_type,
int count,
Object theData ) throws HDFException
static
Parameters
gr_idIN: the GR identifier returned by GRstart
attr_nameIN: the name of the attribute
data_typeIN: the number type of the data
countIN: the length the data (length of 'values')
theDataIN: Object – the value to be written, a Java array of numbers.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:This routine converts the Java array to bytes then writes it. DO NOT USE THIS TO WRITE A STRING.

Returns
true on success

◆ GRsetattr() [3/3]

static native boolean GRsetattr ( long gr_id,
String attr_name,
long data_type,
int count,
String values ) throws HDFException
static
Parameters
gr_idIN: the GR identifier returned by GRstart
attr_nameIN: the name of the attribute
data_typeIN: the number type of the data (should be DFNT_CHAR)
countIN: the length the data (length of 'values')
valuesIN: the the attribute to write – A String
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:This routine writes a attribute that is a String. Alternative methods write data of other types.

Returns
true on success

◆ GRsetchunk()

static native boolean GRsetchunk ( long sdsid,
HDFChunkInfo chunk_def,
int flags ) throws HDFException
static
Parameters
sdsidIN: the SD identifier returned by SDselect
chunk_defIN: HDFChunkInfo, the chunking info
flagsIN: the type of chunking
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:The chunking algorithm-specific information is passed in an appropriate sub-class of HDFChunkInfo.

Returns
true on success

◆ GRsetchunkcache()

static native int GRsetchunkcache ( long sdsid,
int maxcache,
int flags ) throws HDFException
static

◆ GRsetcompress()

static native boolean GRsetcompress ( long ri_id,
int comp_type,
HDFCompInfo c_info ) throws HDFException
static
Parameters
ri_idIN: the GR identifier returned by GRstart
comp_typeIN: the type of compression
c_infoIN: HDFCompInfo, the compression info
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:The compression algorithm specific information is passed in an appropriate sub-class of HDFCompInfo.

Returns
true on success

◆ GRsetexternalfile()

static native boolean GRsetexternalfile ( long ri_id,
String filename,
int offset ) throws HDFException
static

◆ GRstart()

static native int GRstart ( long fid) throws HDFException
static

◆ GRwriteimage() [1/2]

static native boolean GRwriteimage ( long grid,
int[] start,
int[] stride,
int[] edge,
byte[] data ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
startIN: int[2], start
strideIN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
edgeIN: int[2], count
dataIN: byte[], data to be written
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to write from a Java 2D array use the alternative routine below.

Returns
true on success

◆ GRwriteimage() [2/2]

static boolean GRwriteimage ( long grid,
int[] start,
int[] stride,
int[] edge,
Object theData ) throws HDFException
static
Parameters
gridIN: the GR interface id, returned by GRstart
startIN: int[2], start
strideIN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
edgeIN: int[2], count
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts the Java array to a contiguous block of bytes appropriate for C, and then writes the bytes.

Returns
true on success

◆ GRwritelut() [1/2]

static native boolean GRwritelut ( long pal_id,
int ncomp,
int data_type,
int interlace,
int num_entries,
byte[] pal_data ) throws HDFException
static
Parameters
pal_idIN: the palette identifier returned by GRgetlutid
ncompIN: int, number of components
data_typeIN: int, number type
interlaceIN: int, interlace
num_entriesIN: int, number of entries
pal_dataIN: byte[], palette data to be written–as bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
           <p>
           <b>NOTE:</b> to write from a Java array of numbers use the alternative routine
           below.
Returns
true on success

◆ GRwritelut() [2/2]

static boolean GRwritelut ( long pal_id,
int ncomp,
int data_type,
int interlace,
int num_entries,
Object theData ) throws HDFException
static
Parameters
pal_idIN: the palette identifier returned by GRgetlutid
ncompIN: int, number of components
data_typeIN: int, number type
interlaceIN: int, interlace
num_entriesIN: int, number of entries
theDataIN: Object, palette data to be written, any number type.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
           <p>
           <b>Note:</b> converts the Java array to a contiguous block of bytes appropriate
           for C, and then writes the bytes.
Returns
true on success

◆ Hcache()

static native boolean Hcache ( long file_id,
int cache_switch ) throws HDFException
static

◆ HCget_config_info()

static native int HCget_config_info ( int coder_type) throws HDFException
static

New API for hdf-42r1

Parameters
coder_typecomp_coder_t enum for determining which type of encoding is being done
Exceptions
hdf.hdflib.HDFExceptionthrown for errors in the HDF library call.
Returns
the compression config info value

◆ Hclose()

static native boolean Hclose ( long fid) throws HDFException
static

◆ HDdont_atexit()

static native int HDdont_atexit ( ) throws HDFException
static

◆ HDFclose()

static native boolean HDFclose ( long file_id) throws HDFException
static

◆ HDFopen()

static native long HDFopen ( String filename,
int access,
short n_dds ) throws HDFException
static

◆ HDgetNTdesc()

static native String HDgetNTdesc ( int nt) throws HDFException
static

◆ HEprint()

static native void HEprint ( Object stream,
int level ) throws HDFException
static

◆ HEstring()

static native String HEstring ( int error_code) throws HDFException
static

◆ HEvalue()

static native short HEvalue ( int level) throws HDFException
static

◆ Hgetfileversion()

static native boolean Hgetfileversion ( long file_id,
int[] vers,
String[] string ) throws HDFException
static

Note: the version of an HDF file is not well defined, it is not recommended that programs rely on these numbers.

Parameters
file_idIN: long, the file descriptor returned by Hopen
versOUT: int[3], the major version, minor version, and release number of the file.
stringOUT: String[1], the version string
Exceptions
hdf.hdflib.HDFExceptionthrown for errors in the HDF library call.
Returns
the major, minor, and release number are returned in the array of ints, and a string is returned in the string.

◆ Hgetlibversion()

static native boolean Hgetlibversion ( int[] vers,
String[] string ) throws HDFException
static
Parameters
versOUT: int[3], the major version, minor version, and release number of the HDF library.
stringOUT: String[1], the version string
Returns
the major, minor, and release number are returned in the array of ints, and a string is returned in the string.
Exceptions
hdf.hdflib.HDFExceptionthrown for errors in the HDF library call.

◆ Hishdf()

static native boolean Hishdf ( String fileName) throws HDFException
static

◆ Hnumber() [1/2]

static int Hnumber ( long fid) throws HDFException
static

◆ Hnumber() [2/2]

static native int Hnumber ( long fid,
int tagtype ) throws HDFException
static

◆ Hopen() [1/3]

static long Hopen ( String filename) throws HDFException
static

◆ Hopen() [2/3]

static long Hopen ( String filename,
int access ) throws HDFException
static

◆ Hopen() [3/3]

static native long Hopen ( String filename,
int access,
int ndds ) throws HDFException
static

◆ Hsetaccesstype()

static native boolean Hsetaccesstype ( long h_id,
int access_type ) throws HDFException
static

◆ Hsync()

static native boolean Hsync ( long file_id) throws HDFException
static

◆ HXsetcreatedir()

static native boolean HXsetcreatedir ( String dir) throws HDFException
static

◆ HXsetdir()

static native boolean HXsetdir ( String dir) throws HDFException
static

◆ loadH4Lib()

static void loadH4Lib ( )
static

◆ SDattrinfo()

static native boolean SDattrinfo ( long id,
int index,
String[] name,
int[] argv ) throws HDFException
static
Parameters
idIN: id of a file, SDS, or dimension
indexIN: index of the attribute
nameOUT: String[1], the name of the attribute
argvOUT: int[2], number type of the attribute, number of values in the attribute
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
name[0] = attr_name, argv[0] = data_type, argv[1] = count

◆ SDcheckempty()

static native boolean SDcheckempty ( long sdsid,
int[] emptySDS ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
emptySDSOUT: int[1], 1 if the SDS is empty, 0 if has data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
true on success

◆ SDcreate()

static native long SDcreate ( long sd_id,
String name,
long number_type,
int rank,
int[] dimsizes ) throws HDFException
static

◆ SDdiminfo()

static native boolean SDdiminfo ( long dimid,
String[] name,
int[] argv ) throws HDFException
static
Parameters
dimidIN: the dimension id, returned by SDgetdimid
nameOUT: String[1], the dimension name
argvOUT: int[3], size of the name string, number type of data in the array, # attributes for the dimension
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
name[0] = name, argv[0] = count, argv[1] = data_type, argv[2] = nattr

◆ SDend()

static native boolean SDend ( long sdid) throws HDFException
static

◆ SDendaccess()

static native boolean SDendaccess ( long sdsid) throws HDFException
static

◆ SDfileinfo()

static native boolean SDfileinfo ( long sdid,
int[] argv ) throws HDFException
static
Parameters
sdidIN: the SD interface id, returned by SDstart
argvOUT: int[2], Number of datasets in the file, Number of global attributes in the file
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the file info: argv[0] = n_datasets, argv[1] = n_file_attrs

◆ SDfindattr()

static native long SDfindattr ( long id,
String name ) throws HDFException
static

◆ SDgetcal()

static native boolean SDgetcal ( long sdsid,
double[] argv,
int[] NT ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
argvOUT: double[4], calibration information: calibration factor calibration error offset offset error
NTOUT: int[1], number type of uncalibrated data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
argv[0] = cal, argv[1] = cal_err, argv[2] = offset, argv[3] = offset_err, NT[0] = data_type

◆ SDgetchunkinfo()

static native boolean SDgetchunkinfo ( long sdsid,
HDFChunkInfo chunk_def,
int[] clflags ) throws HDFException
static
Parameters
sdsidIN: the SD identifier returned by SDselect
chunk_defOUT: HDFChunkInfo, the chunking info
clflagsOUT: int[1], the type of chunking
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
c_info contains information about the chunking method, clflags[0] == the chunking flags
    <p>
    <b>NOTE:</b>The chunking algorithm-specific information is passed in an appropriate
    sub-class of HDFChunkInfo.

◆ SDgetcompinfo()

static native boolean SDgetcompinfo ( long id,
HDFCompInfo cinfo ) throws HDFException
static
Parameters
idIN: the SD identifier returned by SDselect
cinfoIN: HDFCompInfo, the compression info
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:The compression algorithm specific information is passed in an appropriate sub-class of HDFCompInfo.

Returns
true on success

◆ SDgetdatastrs()

static native boolean SDgetdatastrs ( long sdsid,
String[] strings,
int len ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
stringsOUT: String[4], data information strings: label unit print format coordinate system
lenIN: int, max len of string (not needed by Java – the HDFLibrary interface will handle this)
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
strings[0] = label, strings[1] = unit, strings[2] = format, strings[3] = coordsys,

◆ SDgetdimid()

static native long SDgetdimid ( long sdsid,
int index ) throws HDFException
static

◆ SDgetdimscale() [1/2]

static native boolean SDgetdimscale ( long dimid,
byte[] data ) throws HDFException
static
Parameters
dimidIN: id of a dimension as returned by SDgetdimid
dataOUT: byte[], data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into a Java array use the alternative routine below.

◆ SDgetdimscale() [2/2]

static boolean SDgetdimscale ( long dimid,
Object theData ) throws HDFException
static
Parameters
dimidIN: id of a dimension as returned by SDgetdimid
theDataOUT: Object, a Java array of appropriate type and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array.
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ SDgetdimstrs()

static native boolean SDgetdimstrs ( long dimid,
String[] args,
int len ) throws HDFException
static
Parameters
dimidIN: id of the SDS as returned by SDselect
argsOUT: String[3], data information strings: label unit print format
lenIN: int, max len of string (not needed by Java – the HDFLibrary interface will handle this)
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
strings[0] = label, strings[1] = unit, strings[2] = format

◆ SDgetfillvalue() [1/2]

static native boolean SDgetfillvalue ( long sdsid,
byte[] fillValue ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
fillValueOUT: byte[], data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the fill value in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into a Java variable use the alternative routine below.

◆ SDgetfillvalue() [2/2]

static boolean SDgetfillvalue ( long sdsid,
Object[] theFillValue ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
theFillValueOUT: Object[1], one object of appropriate type
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array: theFillValue[0] = fillValue
    <p>
    <b>Note:</b> the routine calls SDgetinfo to determine the correct type, reads the data as
    bytes, and converts to the appropriate Java object.

◆ SDgetinfo()

static native boolean SDgetinfo ( long sdsid,
String[] name,
int[] dimsizes,
int[] args ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
nameOUT: String[1], the name of the dataset
argsOUT: int[3], dataset info: number of dimensions (rank), data type for the data stored in the dataset, number of "netCDF-style" attributes for this dataset
dimsizesOUT: int[(rank)], sizes of dimensions
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the file info: name[0] = gr_name, args[0] = rank, args[1] = data_type, args[2] = nattrs, dim_sizes[] = dimensions

NOTE: the parameters for the Java interface are not in the same order as the C interface.

◆ SDgetrange() [1/2]

static native boolean SDgetrange ( long sdsid,
byte[] max,
byte[] min ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
maxOUT: byte[], max value, as bytes
minOUT: byte[], min value, as bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the max and min values in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into Java doubles, use the alternative routine below.

◆ SDgetrange() [2/2]

static boolean SDgetrange ( long sdsid,
double maxmin[] ) throws HDFException
static
Parameters
sdsidIN: id of the SDS as returned by SDselect
maxminOUT: double[2], the max and min values converted to doubles
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array: maxmin[0] = max, maxmin[1] = min
    <p>
    <b>Note:</b> the routine calls SDgetinfo to determine the correct type, reads the data as
    bytes, and converts to the double.

◆ SDidtoref()

static native int SDidtoref ( long sdsid) throws HDFException
static

◆ SDiscoordvar()

static native boolean SDiscoordvar ( long sdsid) throws HDFException
static

◆ SDisdimval_bwcomp()

static native boolean SDisdimval_bwcomp ( long dimid) throws HDFException
static

◆ SDisrecord()

static native boolean SDisrecord ( long sdsid) throws HDFException
static

◆ SDnametoindex()

static native int SDnametoindex ( long sdid,
String name ) throws HDFException
static

◆ SDreadattr() [1/2]

static native boolean SDreadattr ( long id,
int index,
byte[] data ) throws HDFException
static
Parameters
idIN: id of a file, SDS, or dimension
indexIN: index of the attribute
dataOUT: byte[], data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into a Java array use the alternative routine below.

◆ SDreadattr() [2/2]

static boolean SDreadattr ( long id,
int index,
Object theData ) throws HDFException
static
Parameters
idIN: id of a file, SDS, or dimension
indexIN: index of the attribute
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array.
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ SDreadchunk() [1/2]

static native boolean SDreadchunk ( long sdsid,
int[] origin,
byte[] theData ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
originIN: int[], origin
theDataOUT: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to read into a Java array use the alternative routine below.

Returns
true on success

◆ SDreadchunk() [2/2]

static boolean SDreadchunk ( long sdsid,
int[] origin,
Object theData ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
originIN: int[], origin
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: reads the data as a contiguous array of bytes and then converts it to an appropriate Java object.

Returns
true on success

◆ SDreaddata() [1/2]

static native boolean SDreaddata ( long sdsid,
int[] start,
int[] stride,
int[] count,
byte[] data ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
startIN: int[], start
strideIN: int[], stride
countIN: int[], count
dataOUT: byte[], data
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the form of a continuous array of bytes.
    <p>
    <b>NOTE:</b> to read into a Java array use the alternative routine below.

◆ SDreaddata() [2/2]

static boolean SDreaddata ( long sdsid,
int[] start,
int[] stride,
int[] count,
Object theData ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
startIN: int[], start
strideIN: int[], stride
countIN: int[], count
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
the the data in the Java array.
    <p>
    <b>Note:</b> reads the data as bytes and converts to the Java array.

◆ SDreaddata_double()

static native boolean SDreaddata_double ( long sdsid,
int[] start,
int[] stride,
int[] count,
double[] theData ) throws HDFException
static

◆ SDreaddata_float()

static native boolean SDreaddata_float ( long sdsid,
int[] start,
int[] stride,
int[] count,
float[] theData ) throws HDFException
static

◆ SDreaddata_int()

static native boolean SDreaddata_int ( long sdsid,
int[] start,
int[] stride,
int[] count,
int[] theData ) throws HDFException
static

◆ SDreaddata_long()

static native boolean SDreaddata_long ( long sdsid,
int[] start,
int[] stride,
int[] count,
long[] theData ) throws HDFException
static

◆ SDreaddata_short()

static native boolean SDreaddata_short ( long sdsid,
int[] start,
int[] stride,
int[] count,
short[] theData ) throws HDFException
static

◆ SDreftoindex()

static native int SDreftoindex ( long sdid,
int ref ) throws HDFException
static

◆ SDselect()

static native long SDselect ( long sdid,
int index ) throws HDFException
static

◆ SDsetaccesstype()

static native boolean SDsetaccesstype ( long id,
int accesstype ) throws HDFException
static

◆ SDsetattr() [1/2]

static native boolean SDsetattr ( long s_id,
String attr_name,
long num_type,
int count,
byte[] values ) throws HDFException
static

◆ SDsetattr() [2/2]

static boolean SDsetattr ( long s_id,
String attr_name,
long num_type,
int count,
Object theValues ) throws HDFException
static

◆ SDsetblocksize()

static native boolean SDsetblocksize ( long sdsid,
int block_size ) throws HDFException
static

◆ SDsetcal()

static native boolean SDsetcal ( long sds_id,
double cal,
double cal_err,
double offset,
double offset_err,
int number_type ) throws HDFException
static

◆ SDsetchunk()

static native boolean SDsetchunk ( long sdsid,
HDFChunkInfo chunk_def,
int flags ) throws HDFException
static
Parameters
sdsidIN: the SD identifier returned by SDselect
chunk_defIN: HDFChunkInfo, the chunking info
flagsIN: the type of chunking
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:The chunking algorithm-specific information is passed in an appropriate sub-class of HDFChunkInfo.

Returns
true on success

◆ SDsetchunkcache()

static native int SDsetchunkcache ( long sdsid,
int maxcache,
int flags ) throws HDFException
static

◆ SDsetcompress()

static native boolean SDsetcompress ( long id,
int type,
HDFCompInfo cinfo ) throws HDFException
static
Parameters
idIN: the SD identifier returned by SDselect
typeIN: the type of compression
cinfoIN: HDFCompInfo, the compression info
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE:The compression algorithm specific information is passed in an appropriate sub-class of HDFCompInfo.

Returns
true on success

◆ SDsetdatastrs()

static native boolean SDsetdatastrs ( long sds_id,
String label,
String unit,
String format,
String coordsys ) throws HDFException
static

◆ SDsetdimname()

static native boolean SDsetdimname ( long dim_id,
String dim_name ) throws HDFException
static

◆ SDsetdimscale() [1/2]

static native boolean SDsetdimscale ( long dim_id,
int count,
int number_type,
byte[] data ) throws HDFException
static
Parameters
dim_idIN: id of a dimension
countIN: number of values
number_typeIN: number type of the values
dataIN: byte[], the values, in an array of bytes.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: the calling program must assure that the data is correctly formatted for C. To write an array of Java objects, use the alternative routine below.

Returns
true on success

◆ SDsetdimscale() [2/2]

static boolean SDsetdimscale ( long dim_id,
int count,
int number_type,
Object theData ) throws HDFException
static
Parameters
dim_idIN: id of a dimension
countIN: number of values
number_typeIN: number type of the values
theDataOUT: Object, a Java array of appropriate type and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts the Java array to an array of bytes, and writes the bytes.

Returns
true on success

◆ SDsetdimstrs()

static native boolean SDsetdimstrs ( long dim_id,
String label,
String unit,
String format ) throws HDFException
static

◆ SDsetdimval_comp()

static native boolean SDsetdimval_comp ( long dimid,
int comp_mode ) throws HDFException
static

◆ SDsetexternalfile()

static native boolean SDsetexternalfile ( long sds_id,
String filename,
int offset ) throws HDFException
static

◆ SDsetfillmode() [1/2]

static boolean SDsetfillmode ( long sdsid,
boolean fill_enable ) throws HDFException
static
Parameters
sdsidIN: the SD id
fill_enableIN: boolean, true calls library with SD_FILL, false calls library with SD_NOFILL
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.
Returns
true on success

◆ SDsetfillmode() [2/2]

static native boolean SDsetfillmode ( long sdsid,
int fillmode ) throws HDFException
static

◆ SDsetfillvalue() [1/2]

static native boolean SDsetfillvalue ( long sds_id,
byte[] fill_val ) throws HDFException
static
Parameters
sds_idIN: id of a dataset
fill_valIN: byte[], the fill values in an array of bytes.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: the calling program must assure that the data is correctly formatted for C. To set the fill value with a Java object, use the alternative routine below.

Returns
true on success

◆ SDsetfillvalue() [2/2]

static boolean SDsetfillvalue ( long sds_id,
Object the_fill_val ) throws HDFException
static
Parameters
sds_idIN: id of a dataset
the_fill_valIN: Object, a Java object of appropriate type
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts the Java array to an array of bytes, and writes the bytes.

Returns
true on success

◆ SDsetnbitdataset()

static native boolean SDsetnbitdataset ( long id,
int start_bit,
int bit_len,
int sign_ext,
int fill_one ) throws HDFException
static

◆ SDsetrange() [1/2]

static native boolean SDsetrange ( long sdsid,
byte[] max,
byte[] min ) throws HDFException
static
Parameters
sdsidIN: id of a dataset
maxIN: byte[], the max value in an array of bytes
minIN: byte[], the min value in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: the calling program must assure that the data is correctly formatted for C. To set the max and min value with Java objects, use the alternative routine below.

Returns
true on success

◆ SDsetrange() [2/2]

static boolean SDsetrange ( long sdsid,
Object max,
Object min ) throws HDFException
static
Parameters
sdsidIN: id of a dataset
maxIN: Object, a Java object of appropriate type
minIN: Object, a Java object of appropriate type
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts the Java array to an array of bytes, and writes the bytes.

Returns
true on success

◆ SDstart()

static native long SDstart ( String filename,
int accessmode ) throws HDFException
static

◆ SDwritechunk() [1/2]

static native boolean SDwritechunk ( long sdsid,
int[] origin,
byte[] data ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
originIN: int[], origin
dataIN: byte[], data to be written, in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to write from a Java array use the alternative routine below.

Returns
true on success

◆ SDwritechunk() [2/2]

static boolean SDwritechunk ( long sdsid,
int[] origin,
Object theData ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
originIN: int[], origin
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts to the Java array to a contiguous array of bytes and then writes to the file.

Returns
true on success

◆ SDwritedata() [1/2]

static native boolean SDwritedata ( long sdsid,
int[] start,
int[] stride,
int[] count,
byte[] data ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
startIN: int[], start
strideIN: int[], stride
countIN: int[], count
dataIN: byte[], data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to write from a Java array use the alternative routine below.

Returns
true on success

◆ SDwritedata() [2/2]

static boolean SDwritedata ( long sdsid,
int[] start,
int[] stride,
int[] count,
Object theData ) throws HDFException
static
Parameters
sdsidIN: the SD interface id, returned by SDselect
startIN: int[], start
strideIN: int[], stride
countIN: int[], count
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts to the Java array to a contiguous array of bytes and then writes to the file.

Returns
true on success

◆ Vaddtagref()

static native int Vaddtagref ( long vgroup_id,
int tag,
int ref ) throws HDFException
static

◆ Vattach()

static native int Vattach ( long fid,
int vgroup_ref,
String access ) throws HDFException
static

◆ Vattrinfo()

static native boolean Vattrinfo ( long id,
int index,
String[] name,
int[] argv ) throws HDFException
static
Parameters
idIN: Vgroup identifier returned by Vattach
indexIN: the index of the attribute
nameOUT: String[1], the name of the attribute
argvOUT: int[5], Data type of the target attribute, Number of values in the target attribute, Size, in bytes, of the values of the target attribute, ,
Exceptions
hdf.hdflib.HDFExceptionthrown for errors in the HDF library call.
Returns
name[0] = name, argv[0] = data_type, argv[1] = count, argv[2] = size, argv[3] = nfields, argv[4] = refnum

◆ Vdeletetagref()

static native int Vdeletetagref ( long vgroup_id,
int tag,
int ref ) throws HDFException
static

◆ Vdetach()

static native void Vdetach ( long vgroup_id) throws HDFException
static

◆ Vend()

static native void Vend ( long file_id) throws HDFException
static

◆ VFfieldesize()

static native int VFfieldesize ( long vdata_id,
int field_index ) throws HDFException
static

◆ VFfieldisize()

static native int VFfieldisize ( long vdata_id,
int field_index ) throws HDFException
static

◆ VFfieldname()

static native String VFfieldname ( long vdata_id,
int field_index ) throws HDFException
static

◆ VFfieldorder()

static native int VFfieldorder ( long vdata_id,
int field_index ) throws HDFException
static

◆ VFfieldtype()

static native long VFfieldtype ( long vdata_id,
int field_index ) throws HDFException
static

◆ Vfind()

static native int Vfind ( long file_id,
String vgroup_name ) throws HDFException
static

◆ Vfindattr()

static native long Vfindattr ( long id,
String name ) throws HDFException
static

◆ Vfindclass()

static native int Vfindclass ( long file_id,
String vgclassname ) throws HDFException
static

◆ Vflocate()

static native int Vflocate ( int key,
String vgclassname ) throws HDFException
static

◆ VFnfields()

static native int VFnfields ( long vkey) throws HDFException
static

◆ Vgetattr() [1/2]

static native boolean Vgetattr ( long id,
int index,
byte[] data ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the attribute
dataOUT: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to read into a Java array use the alternative routine below.
Returns
data = the value of the attribute, in an array of bytes

◆ Vgetattr() [2/2]

static boolean Vgetattr ( long id,
int index,
Object theData ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the attribute
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> reads the data as a contiguous array of bytes and then converts it to
           an appropriate Java object.
Returns
data = the value of the attribute, in an array of Java objects

◆ Vgetclass()

static native void Vgetclass ( long vgroup_id,
String[] hdfclassname ) throws HDFException
static
Parameters
vgroup_idIN: the Vgroup id
hdfclassnameOUT: String[1], the HDF class of the vgroup.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.

◆ Vgetid()

static native int Vgetid ( long file_id,
int vgroup_ref ) throws HDFException
static

◆ Vgetname()

static native void Vgetname ( long vgroup_id,
String[] hdfname ) throws HDFException
static
Parameters
vgroup_idIN: the Vgroup id
hdfnameOUT: String[1], the name of the vgroup.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.

◆ Vgetnext()

static native int Vgetnext ( int key,
int ref ) throws HDFException
static

◆ Vgettagref()

static native boolean Vgettagref ( long vgroup_id,
int index,
int[] tagref ) throws HDFException
static
Parameters
vgroup_id
  • IN: the Vgroup id
index
  • IN: the index of the object
tagref
  • OUT: tagref[0]=tag, tagref[1]=ref
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
tags[0] = tag for object index, refs[0] = ref for objects index

◆ Vgettagrefs()

static native int Vgettagrefs ( long vgroup_id,
int[] tags,
int[] refs,
int arraysize ) throws HDFException
static
Parameters
vgroup_idIN: the Vgroup id
tagsOUT: int[arraysize], the tags
refsOUT: int[arraysize], the refs
arraysizeIN: int, the number of tags/refs to return
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
tags[] = tags for objects 0 - n, refs[] = refs for objects 0 - n

◆ Vgetversion()

static native int Vgetversion ( long id) throws HDFException
static

◆ VHmakegroup()

static native int VHmakegroup ( long file_id,
int[] tag_array,
int[] ref_array,
int n_objects,
String vgroup_name,
String vgroup_class ) throws HDFException
static

◆ VHstoredata() [1/2]

static native int VHstoredata ( long file_id,
String fieldname,
byte[] buf,
int n_records,
int data_type,
String vdata_name,
String vdata_class ) throws HDFException
static
Parameters
file_idIN: the SD interface id, returned by SDselect
fieldnameIN: String, the name of the field to be filled
bufIN: byte[], data to be written, in an array of bytes
n_recordsIN: int, the number of records being written
data_typeIN: int, the number type of the data
vdata_nameIN: String, the name of the Vdata
vdata_classIN: String, the class of the Vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to write from a Java array use the alternative routine below.

Returns
negative on failure

◆ VHstoredata() [2/2]

static int VHstoredata ( long file_id,
String fieldname,
Object thebuf,
int n_records,
int data_type,
String vdata_name,
String vdata_class ) throws HDFException
static
Parameters
file_idIN: the SD interface id, returned by SDselect
fieldnameIN: String, the name of the field to be filled
thebufIN: Object, data to be written, in a Java array of appropriate type and size
n_recordsIN: int, the number of records being written
data_typeIN: int, the number type of the data
vdata_nameIN: String, the name of the Vdata
vdata_classIN: String, the class of the Vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts to the Java array to a contiguous array of bytes and then writes to the file.

Returns
negative on failure

◆ VHstoredatam() [1/2]

static native int VHstoredatam ( long file_id,
String fieldname,
byte[] buf,
int n_records,
int data_type,
String vdata_name,
String vdata_class,
int order ) throws HDFException
static
Parameters
file_idIN: the SD interface id, returned by SDselect
fieldnameIN: String, the name of the field to be filled
bufIN: byte[], data to be written, in an array of bytes
n_recordsIN: int, the number of records being written
data_typeIN: int, the number type of the data
vdata_nameIN: String, the name of the Vdata
vdata_classIN: String, the class of the Vdata
orderIN: int, the number of components per field
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

NOTE: to write from a Java array use the alternative routine below.

Returns
negative on failure

◆ VHstoredatam() [2/2]

static int VHstoredatam ( long file_id,
String fieldname,
Object buf,
int n_records,
int data_type,
String vdata_name,
String vdata_class,
int order ) throws HDFException
static
Parameters
file_idIN: the SD interface id, returned by SDselect
fieldnameIN: String, the name of the field to be filled
bufIN: Object, data to be written, in a Java array of appropriate type, dimension, and size
n_recordsIN: int, the number of records being written
data_typeIN: int, the number type of the data
vdata_nameIN: String, the name of the Vdata
vdata_classIN: String, the class of the Vdata
orderIN: int, the number of components per field
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors.

Note: converts to the Java array to a contiguous array of bytes and then writes to the file.

Returns
negative on failure

◆ Vinqtagref()

static native boolean Vinqtagref ( long vgroup_id,
int tag,
int ref ) throws HDFException
static

◆ Vinquire()

static native boolean Vinquire ( long vgroup_id,
int[] n_entries,
String[] vgroup_name ) throws HDFException
static
Parameters
vgroup_idIN: the Vgroup id
n_entriesOUT: int[1], the number of objects in the Vgroup
vgroup_nameOUT: String[1], the name of the Vgroup
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
n_entries[0] = number of entries, vgroup_name[0] = the name

◆ Vinsert()

static native int Vinsert ( long vgroup_id,
long v_id ) throws HDFException
static

◆ Visvg()

static native boolean Visvg ( long vgroup_id,
int vgroup_ref ) throws HDFException
static

◆ Visvs()

static native boolean Visvs ( long vgroup_id,
int vdata_ref ) throws HDFException
static

◆ Vlone()

static native int Vlone ( long fid,
int[] ref_array,
int buffersize ) throws HDFException
static
Parameters
fidIN: the file identifier returned by Hopen
ref_arrayOUT: int[], the refs for Vdata not part of Vgroups
buffersizeIN: the max size of the ref_array
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
ref_array[] = refs 0 - ...

◆ Vnattrs()

static native int Vnattrs ( long id) throws HDFException
static

◆ Vnrefs()

static native int Vnrefs ( int key,
int ref ) throws HDFException
static

◆ Vntagrefs()

static native int Vntagrefs ( long vgroup_id) throws HDFException
static

◆ VQueryref()

static native int VQueryref ( long vkey) throws HDFException
static

◆ VQuerytag()

static native int VQuerytag ( long vkey) throws HDFException
static

◆ VSappendable()

static native boolean VSappendable ( int vkey,
int block_size ) throws HDFException
static

◆ VSattach()

static native int VSattach ( long fid,
int vdata_ref,
String access ) throws HDFException
static

◆ VSattrinfo()

static native boolean VSattrinfo ( long id,
int index,
int attr_index,
String[] name,
int[] argv ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: int, the index of the attribute
attr_indexIN: int, the index of the attribute
nameOUT: String[1], the name of the attribute
argvOUT: int[3], Data type of the target attribute, Number of values in the target attribute, Size, in bytes, of the values of the target attribute,
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
name[0] = name, argv[0] = data_type, argv[1] = count, argv[2] = size

◆ VSdetach()

static native void VSdetach ( long vdata_id) throws HDFException
static

◆ VSelts()

static native int VSelts ( long vdata_id) throws HDFException
static

◆ Vsetattr() [1/3]

static native boolean Vsetattr ( long id,
String attr_name,
long data_type,
int count,
byte[] data ) throws HDFException
static
Parameters
idIN: the Vdata id
attr_nameIN: String, the name of the attribute
data_typeIN: int, the number_type of the attribute
countIN: the number of values
dataIN: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write into a Java array use the alternative routine below.
Returns
true on success

◆ Vsetattr() [2/3]

static boolean Vsetattr ( long id,
String attr_name,
long data_type,
int count,
Object theData ) throws HDFException
static
Parameters
idIN: the Vdata id
attr_nameIN: String, the name of the attribute
data_typeIN: int, the number_type of the attribute
countIN: the number of values
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data to a contiguous array of bytes and then converts
           writes it.
Returns
true on success

◆ Vsetattr() [3/3]

static native boolean Vsetattr ( long id,
String attr_name,
long data_type,
int count,
String values ) throws HDFException
static

◆ Vsetclass()

static native boolean Vsetclass ( long vgroup_id,
String vgclassname ) throws HDFException
static

◆ Vsetname()

static native boolean Vsetname ( long vgroup_id,
String vgname ) throws HDFException
static

◆ VSfdefine()

static native boolean VSfdefine ( long vdata_id,
String fieldname,
int numbertype,
int order ) throws HDFException
static

◆ VSfexist()

static native boolean VSfexist ( long vdata_id,
String fields ) throws HDFException
static

◆ VSfind()

static native int VSfind ( long file_id,
String vdataname ) throws HDFException
static

◆ VSfindattr()

static native int VSfindattr ( long id,
int index,
String name ) throws HDFException
static

◆ VSfindclass()

static native int VSfindclass ( long file_id,
String vgclass ) throws HDFException
static

◆ VSfindex()

static native int VSfindex ( long id,
String name,
int[] findex ) throws HDFException
static
Parameters
idIN: the Vdata id
nameIN: the name of the attribute
findexIN: int[1], the index of the attribute
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
findex[0] = the index

◆ VSfnattrs()

static native int VSfnattrs ( long id,
int fnattrs ) throws HDFException
static

◆ VSgetattr() [1/2]

static native boolean VSgetattr ( long id,
int index,
int attr_index,
byte[] data ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the vdata
attr_indexIN: the index of the attribute
dataOUT: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to read into a Java array use the alternative routine below.
Returns
data = the value of the attribute, in an array of bytes

◆ VSgetattr() [2/2]

static boolean VSgetattr ( long id,
int index,
int attr_index,
Object theData ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the vdata
attr_indexIN: the index of the attribute
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> reads the data as a contiguous array of bytes and then converts it to
           an appropriate Java object.
Returns
data = the value of the attribute, in an array of Java objects

◆ VSgetclass()

static native void VSgetclass ( long vdata_id,
String[] hdfclassname ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
hdfclassnameOUT, String[1], the class name of the vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.

◆ VSgetfields()

static native int VSgetfields ( long vdata_id,
String[] fieldname ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
fieldnameOUT, String[1], the names of the fields
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
fieldname[0] == a comma delimited string with the names of the fields.

◆ VSgetid()

static native long VSgetid ( long file_id,
int vdata_ref ) throws HDFException
static

◆ VSgetinterlace()

static native int VSgetinterlace ( long vdata_id) throws HDFException
static

◆ VSgetname()

static native void VSgetname ( long vdata_id,
String[] hdfname ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
hdfnameOUT, String[1], the name of the vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.

◆ VSgetversion()

static native int VSgetversion ( int vkey) throws HDFException
static

◆ VSinquire() [1/2]

static native boolean VSinquire ( long vdata_id,
int[] iargs ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
iargsOUT, int[2], block_size, num_blocks
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
iargs[0] = blocksize, iargs[1] = num_blocks
    <p>
    <b>NOTE:</b> the parameters for the Java interface are not in the same order as the C
    interface.

◆ VSinquire() [2/2]

static native boolean VSinquire ( long vdata_id,
int[] iargs,
String[] sargs ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
iargsOUT, int[3], n_records, interlace, vdata_size
sargsOUT, String[2], names the dataset, fields
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
iargs[0] = n_records, iargs[1] = interlace, iargs[2] = vdata_size, sargs[0] = vdata_name, sargs[1] = comma delimited list of fields

NOTE: the parameters for the Java interface are not in the same order as the C interface.

◆ VSisattr()

static native boolean VSisattr ( long id) throws HDFException
static

◆ VSlone()

static native int VSlone ( long fid,
int[] ref_array,
int buffersize ) throws HDFException
static
Parameters
fidIN, File identifier returned by Hopen
ref_arrayOUT, int[?], the refs
buffersizeIN, int, the max number of refs to return.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
ref_array contains refs. The Java API ignores the buffersize argument, returns as many as possible.

◆ VSnattrs()

static native int VSnattrs ( long id) throws HDFException
static

◆ VSQuerycount()

static native boolean VSQuerycount ( long vdata_id,
int[] n_records ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
n_recordsOUT, int[1], the number of records in the vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
n_records[0] == the number of records

◆ VSQueryfields()

static native boolean VSQueryfields ( long vdata_id,
String[] fields ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
fieldsOUT, String[1], the names of the fields
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
fields[0] == a comma delimited string with the names of the fields.

◆ VSQueryinterlace()

static native boolean VSQueryinterlace ( long vdata_id,
int[] interlace ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
interlaceOUT, int[1], the interlace mode,
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
interlace[0] == the number of records, HDFConstants.FULL_INTERLACE or HDFConstants.NO_INTERLACE

◆ VSQueryname()

static native boolean VSQueryname ( long vdata_id,
String[] vdata_name ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
vdata_nameOUT, String[1], the name of the vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
vdata_name[0] == the name

◆ VSQueryref()

static native int VSQueryref ( long vdata_id) throws HDFException
static

◆ VSQuerytag()

static native int VSQuerytag ( long vdata_id) throws HDFException
static

◆ VSQueryvsize()

static native boolean VSQueryvsize ( long vdata_id,
int[] vdata_size ) throws HDFException
static
Parameters
vdata_idIN, vdata id as returned by VSattach
vdata_sizeOUT, int[1], the size of the vdata
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
Returns
vdata_size[0] == Native size, in bytes, of a record in the vdata

◆ VSread() [1/2]

static native int VSread ( long vdata_id,
byte[] databuf,
int nrecord,
int interlace ) throws HDFException
static
Parameters
vdata_idIN: the Vdata id
databufOUT: byte[], the data in an array of bytes
nrecordIN: int, number of records
interlaceIN: int, interlace
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to read into a Java array use the alternative routine below.
Returns
the number of elements read (0 or a +ve integer)

◆ VSread() [2/2]

static int VSread ( long vdata_id,
Object theData,
int nrecord,
int interlace ) throws HDFException
static
Parameters
vdata_idIN: the Vdata id
theDataOUT: Object, a Java array of appropriate type, dimensions, and size.
nrecordIN: int, number of records
interlaceIN: int, interlace
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> reads the data as a contiguous array of bytes and then converts it to
           an appropriate Java object.
Returns
the number of elements read (0 or a +ve integer)

◆ VSseek()

static native int VSseek ( long vdata_id,
int record ) throws HDFException
static

◆ VSsetattr() [1/3]

static native boolean VSsetattr ( long id,
int index,
String attr_name,
long data_type,
int count,
byte[] values ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the vdata
attr_nameIN: String, the name of the attribute
data_typeIN: int, the number_type of the attribute
countIN: the number of values
valuesIN: byte[], the data in an array of bytes
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write into a Java array use the alternative routine below.
Returns
true on success

◆ VSsetattr() [2/3]

static boolean VSsetattr ( long id,
int index,
String attr_name,
long data_type,
int count,
Object theData ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the vdata
attr_nameIN: String, the name of the attribute
data_typeIN: int, the number_type of the attribute
countIN: the number of values
theDataIN: Object, a Java array of appropriate type, dimensions, and size.
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Note:</b> converts the data to a contiguous array of bytes and then converts
           writes it.
Returns
true on success

◆ VSsetattr() [3/3]

static native boolean VSsetattr ( long id,
int index,
String attr_name,
long data_type,
int count,
String values ) throws HDFException
static
Parameters
idIN: the Vdata id
indexIN: the index of the vdata
attr_nameIN: String, the name of the attribute
data_typeIN: int, the number_type of the attribute
countIN: the number of values
valuesIN: String, the data in an String
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write from a Java array use the alternative routine below.
Returns
true on success

◆ VSsetblocksize()

static native int VSsetblocksize ( long vdata_id,
int blocksize ) throws HDFException
static

◆ VSsetclass()

static native void VSsetclass ( long vdata_id,
String vdata_class ) throws HDFException
static

◆ VSsetexternalfile()

static native boolean VSsetexternalfile ( int vkey,
String filename,
int offset ) throws HDFException
static

◆ VSsetfields()

static native boolean VSsetfields ( long vdata_id,
String fields ) throws HDFException
static

◆ VSsetinterlace()

static native boolean VSsetinterlace ( long vdata_id,
int interlace ) throws HDFException
static

◆ VSsetname()

static native void VSsetname ( long vdata_id,
String vdata_name ) throws HDFException
static

◆ VSsetnumblocks()

static native int VSsetnumblocks ( long vdata_id,
int numblocks ) throws HDFException
static

◆ VSsizeof()

static native int VSsizeof ( long vdata_id,
String fields ) throws HDFException
static

◆ Vstart()

static native boolean Vstart ( long fid) throws HDFException
static

◆ VSwrite() [1/2]

static native int VSwrite ( long vdata_id,
byte[] databuf,
int n_records,
int interlace ) throws HDFException
static
Parameters
vdata_idIN: the Vdata id
databufIN: byte[], the data in an array of bytes
n_recordsIN: int, number of records
interlaceIN: int, interlace
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>NOTE:</b> to write a Java array use the alternative routine below.
Returns
the number of elements written (0 or a +ve integer)

◆ VSwrite() [2/2]

static int VSwrite ( long vdata_id,
Object databuf,
int n_records,
int interlace ) throws HDFException
static
Parameters
vdata_idIN: the Vdata id
databufIN: Object, a Java array of appropriate type, dimensions, and size.
n_recordsIN: int, number of records
interlaceIN: int, interlace
Exceptions
hdf.hdflib.HDFExceptionshould be thrown for errors in the HDF library call.
           <p>
           <b>Important Note:</b> This interface only supports records which are all of the
           same numeric type, with no character fields. Heterogeneous fields can be written
           as bytes (see above), but the calling program must make sure the data is in proper
           order to write to the HDF library.

           <p>
           <b>Note:</b> converts the data into a contiguous array of bytes and then writes it
Returns
the number of elements written (0 or a +ve integer)

Field Documentation

◆ H4_LIBRARY_NAME_PROPERTY_KEY

final String H4_LIBRARY_NAME_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.loadLibraryName"
static

◆ HDFPATH_PROPERTY_KEY

final String HDFPATH_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.hdflib"
static

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