Package hdf.hdflib

Class HDFLibrary

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    HDFDeprecated

    public class HDFLibrary
    extends java.lang.Object
    implements java.io.Serializable
    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 *, VOIDP, 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, VOIDP data);
      

    where ``VOIDP'' means that the data 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 layed 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 contigous 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.


    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HDFLibrary()  
    • Method Summary

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HDFPATH_PROPERTY_KEY

        public static final java.lang.String HDFPATH_PROPERTY_KEY
        See Also:
        Constant Field Values
      • H4_LIBRARY_NAME_PROPERTY_KEY

        public static final java.lang.String H4_LIBRARY_NAME_PROPERTY_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • HDFLibrary

        public HDFLibrary()
    • Method Detail

      • loadH4Lib

        public static void loadH4Lib()
      • getJHIVersion

        @Deprecated
        public static final java.lang.String getJHIVersion()
        Deprecated.
      • Hopen

        public static int Hopen​(java.lang.String filename,
                                int access,
                                int ndds)
                         throws HDFException
        Throws:
        HDFException
      • Hgetfileversion

        public static boolean Hgetfileversion​(int file_id,
                                              int[] vers,
                                              java.lang.String[] string)
                                       throws HDFException
        Note: the version of an HDF file is not well defined, it is not recommended that programs rely on these numbers.

        Parameters:
        file_id - IN: int, the file descriptor returned by Hopen
        vers - OUT: int[3], the major version, minor version, and release number of the file.
        string - OUT: 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.
        Throws:
        HDFException - should be thrown for errors in the HDF library call, but is not yet implemented.
      • Hgetlibversion

        public static boolean Hgetlibversion​(int[] vers,
                                             java.lang.String[] string)
                                      throws HDFException
        Parameters:
        vers - OUT: int[3], the major version, minor version, and release number of the HDF library.
        string - OUT: 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.
        Throws:
        HDFException - should be thrown for errors in the HDF library call, but is not yet implemented.
      • Hsetaccesstype

        public static boolean Hsetaccesstype​(int h_id,
                                             int access_type)
                                      throws HDFException
        Throws:
        HDFException
      • ANfileinfo

        public static boolean ANfileinfo​(int an_id,
                                         int[] info)
                                  throws HDFException
        Parameters:
        an_id - IN: the AN interface id, returned by ANstart
        info - OUT: 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
        Throws:
        HDFException - should be thrown for errors.
      • ANselect

        public static int ANselect​(int an_id,
                                   int index,
                                   int anntype)
                            throws HDFException
        Throws:
        HDFException
      • ANnumann

        public static int ANnumann​(int an_id,
                                   int anntype,
                                   short tag,
                                   short ref)
                            throws HDFException
        Throws:
        HDFException
      • ANannlist

        public static int ANannlist​(int an_id,
                                    int anntype,
                                    int tag,
                                    int ref,
                                    int[] ann_list)
                             throws HDFException
        Parameters:
        an_id - IN: the AN interface id, returned by ANstart
        anntype - IN: the number type, as defined in HDFConstants
        tag - IN: the HDF tag
        ref - IN: the HDF ref
        ann_list - OUT: int[], an array of annotation identifiers. The array must be long enough to hold the number of annotations returned by ANnumann
        Returns:
        an array of integers, which are the identifiers of the annotations
        Throws:
        HDFException - should be thrown for errors.
      • ANreadann

        public static boolean ANreadann​(int ann_id,
                                        java.lang.String[] annbuf,
                                        int maxlen)
                                 throws HDFException
        Parameters:
        ann_id - IN: the AN interface id, returned by ANstart
        annbuf - OUT: String[1], the annotation is returned as annbuf[0].
        maxlen - IN: int, the maximum length of the string.
        Returns:
        an annotation string: annbuf[0] = the annotation
        Throws:
        HDFException - should be thrown for errors.
      • ANcreate

        public static int ANcreate​(int an_id,
                                   short tag,
                                   short ref,
                                   int type)
                            throws HDFException
        Throws:
        HDFException
      • ANget_tagref

        public static int ANget_tagref​(int an_id,
                                       int index,
                                       int type,
                                       short[] tagref)
                                throws HDFException
        Parameters:
        an_id - IN: the AN interface id, returned by ANstart
        index - IN: the index of the annotation
        type - IN: the type of the annotation
        tagref - OUT: short[2], the tag and ref of the annotation
        Returns:
        the tag and ref: tagref[0] = tag, tagref[1] = ref
        Throws:
        HDFException - should be thrown for errors.
      • ANid2tagref

        public static boolean ANid2tagref​(int an_id,
                                          short[] tagref)
                                   throws HDFException
        Parameters:
        an_id - IN: the AN interface id, returned by ANstart
        tagref - OUT: short[2], the tag and ref of the annotation
        Returns:
        the tag and ref: tagref[0] = tag, tagref[1] = ref
        Throws:
        HDFException - should be thrown for errors.
      • ANtagref2id

        public static int ANtagref2id​(int an_id,
                                      short tag,
                                      short ref)
                               throws HDFException
        Throws:
        HDFException
      • ANwriteann

        public static boolean ANwriteann​(int ann_id,
                                         java.lang.String label,
                                         int ann_length)
                                  throws HDFException
        Throws:
        HDFException
      • DFPaddpal

        public static boolean DFPaddpal​(java.lang.String filename,
                                        byte[] palette)
                                 throws HDFException
        Throws:
        HDFException
      • DFPgetpal

        public static boolean DFPgetpal​(java.lang.String filename,
                                        byte[] palette)
                                 throws HDFException
        Throws:
        HDFException
      • DFPputpal

        public static boolean DFPputpal​(java.lang.String filename,
                                        byte[] palette,
                                        int overwrite,
                                        java.lang.String filemode)
                                 throws HDFException
        Throws:
        HDFException
      • DFPputpal

        public static boolean DFPputpal​(java.lang.String filename,
                                        byte[] palette,
                                        boolean overwrite,
                                        java.lang.String filemode)
                                 throws HDFException
        Parameters:
        filename - IN: String, the name of the HDF file
        palette - IN: byte[] the palette
        overwrite - IN: boolean, converted to 1 == true, 0 == false to call the HDF library
        filemode - IN: if "a" append palette to file, "w" create new file
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.
      • DFPreadref

        public static boolean DFPreadref​(java.lang.String filename,
                                         short ref)
                                  throws HDFException
        Throws:
        HDFException
      • DFPwriteref

        public static boolean DFPwriteref​(java.lang.String filename,
                                          short ref)
                                   throws HDFException
        Throws:
        HDFException
      • GRfileinfo

        public static boolean GRfileinfo​(int grid,
                                         int[] args)
                                  throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        args - OUT: int[2], n_datasets and n_file_attrs
        Returns:
        the file info: args[0] = n_datasets, args[1] = n_file_attrs
        Throws:
        HDFException - should be thrown for errors.
      • GRgetchunkinfo

        public static boolean GRgetchunkinfo​(int sdsid,
                                             HDFChunkInfo chunk_def,
                                             int[] flag)
                                      throws HDFException
        Parameters:
        sdsid - IN: the SD identifier returned by SDselect
        chunk_def - OUT: HDFChunkInfo, the chunking info
        flag - OUT: int[1], the type of chunking
        Returns:
        c_info contains information about the chunking method, flags[0] == the chunking flags

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

        Throws:
        HDFException - should be thrown for errors.
      • GRnametoindex

        public static int GRnametoindex​(int grid,
                                        java.lang.String name)
                                 throws HDFException
        Throws:
        HDFException
      • GRgetiminfo

        public static boolean GRgetiminfo​(int grid,
                                          java.lang.String[] gr_name,
                                          int[] args,
                                          int[] dim_sizes)
                                   throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        gr_name - OUT: name of raster image
        args - OUT: 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_sizes - OUT: int[2], dim_sizes
        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.

        Throws:
        HDFException - should be thrown for errors.
      • GRreadimage

        public static boolean GRreadimage​(int grid,
                                          int[] start,
                                          int[] stride,
                                          int[] count,
                                          byte[] data)
                                   throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        start - IN: int[2], start
        stride - IN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
        count - IN: int[2], count
        data - OUT: byte[], data
        Returns:
        the the data in the form of a continous array of bytes.

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

        Throws:
        HDFException - should be thrown for errors.
      • GRreadimage

        public static boolean GRreadimage​(int grid,
                                          int[] start,
                                          int[] stride,
                                          int[] count,
                                          java.lang.Object theData)
                                   throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        start - IN: int[2], start
        stride - IN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
        count - IN: int[2], count
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        the the data in the Java array.

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • GRreqimageil

        public static boolean GRreqimageil​(int rrid,
                                           int interlace)
                                    throws HDFException
        Throws:
        HDFException
      • GRgetlutinfo

        public static boolean GRgetlutinfo​(int lutid,
                                           int[] args)
                                    throws HDFException
        Parameters:
        lutid - IN: the palette identifier returned by GRgetlutid
        args - OUT: 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.
        Returns:
        the palette info: args[0] = ncomp, args[1] = data_type, args[2] = interlace, args[3] = num_entries
        Throws:
        HDFException - should be thrown for errors.
      • GRreadlut

        public static boolean GRreadlut​(int lutid,
                                        byte[] data)
                                 throws HDFException
        Parameters:
        lutid - IN: the palette identifier returned by GRgetlutid
        data - OUT: byte[], palette data, in bytes
        Returns:
        the palette data: as bytes

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

        Throws:
        HDFException - should be thrown for errors.
      • GRreadlut

        public static boolean GRreadlut​(int lutid,
                                        java.lang.Object theData)
                                 throws HDFException
        Parameters:
        lutid - IN: the palette identifier returned by GRgetlutid
        theData - OUT: Object, palette data, an Java array
        Returns:
        the palette data: as a Java array

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • GRattrinfo

        public static boolean GRattrinfo​(int id,
                                         int index,
                                         java.lang.String[] name,
                                         int[] argv)
                                  throws HDFException
        Parameters:
        id - IN: the GR identifier returned by GRstart
        index - IN: the index of the attribute
        name - OUT: String[1], the name of the attribute
        argv - OUT: int[2], the type and length of the attribute
        Returns:
        the name, type, and lenght of the attribute: name[0] = name, argv[0] = data_type, argv[1] = length
        Throws:
        HDFException - should be thrown for errors.
      • GRgetattr

        public static boolean GRgetattr​(int id,
                                        int index,
                                        byte[] data)
                                 throws HDFException
        Parameters:
        id - IN: the GR identifier returned by GRstart
        index - IN: index of the attribute for info
        data - OUT: byte[], attribute data, in bytes
        Returns:
        the attribute data: as bytes

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

        Throws:
        HDFException - should be thrown for errors.
      • GRgetattr

        public static boolean GRgetattr​(int id,
                                        int index,
                                        java.lang.Object theData)
                                 throws HDFException
        Parameters:
        id - IN: the GR identifier returned by GRstart
        index - IN: index of the attribute for info
        theData - OUT: Object, attribute data, an Java array
        Returns:
        the attribute data: as a Java array

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • GRfindattr

        public static int GRfindattr​(int id,
                                     java.lang.String name)
                              throws HDFException
        Throws:
        HDFException
      • GRcreate

        public static int GRcreate​(int gr_id,
                                   java.lang.String name,
                                   int ncomp,
                                   int data_type,
                                   int interlace_mode,
                                   int[] dim_sizes)
                            throws HDFException
        Throws:
        HDFException
      • GRsetattr

        public static boolean GRsetattr​(int gr_id,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        java.lang.String values)
                                 throws HDFException
        Parameters:
        gr_id - IN: the GR identifier returned by GRstart
        attr_name - IN: the name of the attribute
        data_type - IN: the number type of the data (should be DFNT_CHAR)
        count - IN: the length the data (lenght of 'values')
        values - IN: the the attribute to write -- A String
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRsetattr

        public static boolean GRsetattr​(int gr_id,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        byte[] values)
                                 throws HDFException
        Parameters:
        gr_id - IN: the GR identifier returned by GRstart
        attr_name - IN: the name of the attribute
        data_type - IN: the number type of the data
        count - IN: the length the data (lenght of 'values')
        values - IN: the the attribute to write -- in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should 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.

      • GRsetattr

        public static boolean GRsetattr​(int gr_id,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        java.lang.Object theData)
                                 throws HDFException
        Parameters:
        gr_id - IN: the GR identifier returned by GRstart
        attr_name - IN: the name of the attribute
        data_type - IN: the number type of the data
        count - IN: the length the data (lenght of 'values')
        theData - IN: Object -- the value to be written, a Java array of numbers.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRsetchunk

        public static boolean GRsetchunk​(int sdsid,
                                         HDFChunkInfo chunk_def,
                                         int flags)
                                  throws HDFException
        Parameters:
        sdsid - IN: the SD identifier returned by SDselect
        chunk_def - IN: HDFChunkInfo, the chunking info
        flags - IN: the type of chunking
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRsetchunkcache

        public static int GRsetchunkcache​(int sdsid,
                                          int maxcache,
                                          int flags)
                                   throws HDFException
        Throws:
        HDFException
      • GRsetcompress

        public static boolean GRsetcompress​(int ri_id,
                                            int comp_type,
                                            HDFCompInfo c_info)
                                     throws HDFException
        Parameters:
        ri_id - IN: the GR identifier returned by GRstart
        comp_type - IN: the type of compression
        c_info - IN: HDFCompInfo, the compression info
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRsetexternalfile

        public static boolean GRsetexternalfile​(int ri_id,
                                                java.lang.String filename,
                                                int offset)
                                         throws HDFException
        Throws:
        HDFException
      • GRwriteimage

        public static boolean GRwriteimage​(int grid,
                                           int[] start,
                                           int[] stride,
                                           int[] edge,
                                           byte[] data)
                                    throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        start - IN: int[2], start
        stride - IN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
        edge - IN: int[2], count
        data - IN: byte[], data to be written
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRwriteimage

        public static boolean GRwriteimage​(int grid,
                                           int[] start,
                                           int[] stride,
                                           int[] edge,
                                           java.lang.Object theData)
                                    throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by GRstart
        start - IN: int[2], start
        stride - IN: int[2], stride. If the stride parameter is set to NULL, a stride of 1 will be assumed. strides of 0 are illegal.
        edge - IN: int[2], count
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRwritelut

        public static boolean GRwritelut​(int pal_id,
                                         int ncomp,
                                         int data_type,
                                         int interlace,
                                         int num_entries,
                                         byte[] pal_data)
                                  throws HDFException
        Parameters:
        pal_id - IN: the palette identifier returned by GRgetlutid
        ncomp - IN: int, number of components
        data_type - IN: int, number type
        interlace - IN: int, interlace
        num_entries - IN: int, number of entries
        pal_data - IN: byte[], palette data to be written--as bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRwritelut

        public static boolean GRwritelut​(int pal_id,
                                         int ncomp,
                                         int data_type,
                                         int interlace,
                                         int num_entries,
                                         java.lang.Object theData)
                                  throws HDFException
        Parameters:
        pal_id - IN: the palette identifier returned by GRgetlutid
        ncomp - IN: int, number of components
        data_type - IN: int, number type
        interlace - IN: int, interlace
        num_entries - IN: int, number of entries
        theData - IN: Object, palette data to be written, any number type.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRreadchunk

        public static boolean GRreadchunk​(int sdsid,
                                          int[] origin,
                                          byte[] theData)
                                   throws HDFException
        Parameters:
        sdsid - IN: the GR interface id, returned by SDselect
        origin - IN: int[], origin
        theData - OUT: byte[], the data in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • GRreadchunk

        public static boolean GRreadchunk​(int grid,
                                          int[] origin,
                                          java.lang.Object theData)
                                   throws HDFException
        Parameters:
        grid - IN: the GR interface id, returned by SDselect
        origin - IN: int[], origin
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • HDFopen

        public static int HDFopen​(java.lang.String filename,
                                  int access,
                                  short n_dds)
                           throws HDFException
        Throws:
        HDFException
      • HEprint

        public static void HEprint​(java.lang.Object stream,
                                   int level)
                            throws HDFException
        Throws:
        HDFException
      • HXsetcreatedir

        public static boolean HXsetcreatedir​(java.lang.String dir)
                                      throws HDFException
        Throws:
        HDFException
      • SDstart

        public static int SDstart​(java.lang.String filename,
                                  int accessmode)
                           throws HDFException
        Throws:
        HDFException
      • SDfileinfo

        public static boolean SDfileinfo​(int sdid,
                                         int[] argv)
                                  throws HDFException
        Parameters:
        sdid - IN: the SD interface id, returned by SDstart
        argv - OUT: int[2], Number of datasets in the file, Number of global attributes in the file
        Returns:
        the file info: argv[0] = n_datasets, argv[1] = n_file_attrs
        Throws:
        HDFException - should be thrown for errors.
      • SDnametoindex

        public static int SDnametoindex​(int sdid,
                                        java.lang.String name)
                                 throws HDFException
        Throws:
        HDFException
      • SDgetinfo

        public static boolean SDgetinfo​(int sdsid,
                                        java.lang.String[] name,
                                        int[] dimsizes,
                                        int[] args)
                                 throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        name - OUT: String[1], the name of the dataset
        args - OUT: 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
        dimsizes - OUT: int[(rank)], sizes of dimensions
        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.

        Throws:
        HDFException - should be thrown for errors.
      • SDcheckempty

        public static boolean SDcheckempty​(int sdsid,
                                           int[] emptySDS)
                                    throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        emptySDS - OUT: int[1], 1 if the SDS is empty, 0 if has data
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.
      • SDreaddata

        public static boolean SDreaddata​(int sdsid,
                                         int[] start,
                                         int[] stride,
                                         int[] count,
                                         byte[] data)
                                  throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        start - IN: int[], start
        stride - IN: int[], stride
        count - IN: int[], count
        data - OUT: byte[], data
        Returns:
        the the data in the form of a continous array of bytes.

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

        Throws:
        HDFException - should be thrown for errors.
      • SDreaddata

        public static boolean SDreaddata​(int sdsid,
                                         int[] start,
                                         int[] stride,
                                         int[] count,
                                         java.lang.Object theData)
                                  throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        start - IN: int[], start
        stride - IN: int[], stride
        count - IN: int[], count
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        the the data in the Java array.

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • SDreaddata_short

        public static boolean SDreaddata_short​(int sdsid,
                                               int[] start,
                                               int[] stride,
                                               int[] count,
                                               short[] theData)
                                        throws HDFException
        Throws:
        HDFException
      • SDreaddata_int

        public static boolean SDreaddata_int​(int sdsid,
                                             int[] start,
                                             int[] stride,
                                             int[] count,
                                             int[] theData)
                                      throws HDFException
        Throws:
        HDFException
      • SDreaddata_long

        public static boolean SDreaddata_long​(int sdsid,
                                              int[] start,
                                              int[] stride,
                                              int[] count,
                                              long[] theData)
                                       throws HDFException
        Throws:
        HDFException
      • SDreaddata_float

        public static boolean SDreaddata_float​(int sdsid,
                                               int[] start,
                                               int[] stride,
                                               int[] count,
                                               float[] theData)
                                        throws HDFException
        Throws:
        HDFException
      • SDreaddata_double

        public static boolean SDreaddata_double​(int sdsid,
                                                int[] start,
                                                int[] stride,
                                                int[] count,
                                                double[] theData)
                                         throws HDFException
        Throws:
        HDFException
      • SDdiminfo

        public static boolean SDdiminfo​(int dimid,
                                        java.lang.String[] name,
                                        int[] argv)
                                 throws HDFException
        Parameters:
        dimid - IN: the dimension id, returned by SDgetdimid
        name - OUT: String[1], the dimension name
        argv - OUT: int[3], size of the name string, number type of data in the array, # attributes for the dimension
        Returns:
        name[0] = name, argv[0] = count, argv[1] = data_type, argv[2] = nattr
        Throws:
        HDFException - should be thrown for errors.
      • SDattrinfo

        public static boolean SDattrinfo​(int id,
                                         int index,
                                         java.lang.String[] name,
                                         int[] argv)
                                  throws HDFException
        Parameters:
        id - IN: id of a file, SDS, or dimension
        index - IN: index of the attribute
        name - OUT: String[1], the name of the attribute
        argv - OUT: int[2], number type of the attribute, number of values in the attribute
        Returns:
        name[0] = attr_name, argv[0] = data_type, argv[1] = count
        Throws:
        HDFException - should be thrown for errors.
      • SDreadattr

        public static boolean SDreadattr​(int id,
                                         int index,
                                         byte[] data)
                                  throws HDFException
        Parameters:
        id - IN: id of a file, SDS, or dimension
        index - IN: index of the attribute
        data - OUT: byte[], data
        Returns:
        the the data in the form of a continous array of bytes.

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

        Throws:
        HDFException - should be thrown for errors.
      • SDreadattr

        public static boolean SDreadattr​(int id,
                                         int index,
                                         java.lang.Object theData)
                                  throws HDFException
        Parameters:
        id - IN: id of a file, SDS, or dimension
        index - IN: index of the attribute
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        the the data in the Java array.

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • SDfindattr

        public static int SDfindattr​(int id,
                                     java.lang.String name)
                              throws HDFException
        Throws:
        HDFException
      • SDgetcal

        public static boolean SDgetcal​(int sdsid,
                                       double[] argv,
                                       int[] NT)
                                throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        argv - OUT: double[4], calibration information: calibration factor calibration error offset offset error
        NT - OUT: int[1], number type of uncalibrated data
        Returns:
        argv[0] = cal, argv[1] = cal_err, argv[2] = offset, argv[3] = offset_err, NT[0] = data_type
        Throws:
        HDFException - should be thrown for errors.
      • SDgetdatastrs

        public static boolean SDgetdatastrs​(int sdsid,
                                            java.lang.String[] strings,
                                            int len)
                                     throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        strings - OUT: String[4], data information strings: label unit print format coordinate system
        len - IN: int, max len of string (not needed by Java -- the HDFLibrary interface will handle this)
        Returns:
        strings[0] = label, strings[1] = unit, strings[2] = format, strings[3] = coordsys,
        Throws:
        HDFException - should be thrown for errors.
      • SDgetdimstrs

        public static boolean SDgetdimstrs​(int dimid,
                                           java.lang.String[] args,
                                           int len)
                                    throws HDFException
        Parameters:
        dimid - IN: id of the SDS as returned by SDselect
        args - OUT: String[3], data information strings: label unit print format
        len - IN: int, max len of string (not needed by Java -- the HDFLibrary interface will handle this)
        Returns:
        strings[0] = label, strings[1] = unit, strings[2] = format
        Throws:
        HDFException - should be thrown for errors.
      • SDgetdimscale

        public static boolean SDgetdimscale​(int dimid,
                                            byte[] data)
                                     throws HDFException
        Parameters:
        dimid - IN: id of a dimension as returned by SDgetdimid
        data - OUT: byte[], data
        Returns:
        the the data in the form of a continous array of bytes.

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

        Throws:
        HDFException - should be thrown for errors.
      • SDgetdimscale

        public static boolean SDgetdimscale​(int dimid,
                                            java.lang.Object theData)
                                     throws HDFException
        Parameters:
        dimid - IN: id of a dimension as returned by SDgetdimid
        theData - OUT: Object, a Java array of appropriate type and size.
        Returns:
        the the data in the Java array.

        Note: reads the data as bytes and converts to the Java array.

        Throws:
        HDFException - should be thrown for errors.
      • SDgetfillvalue

        public static boolean SDgetfillvalue​(int sdsid,
                                             byte[] fillValue)
                                      throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        fillValue - OUT: byte[], data
        Returns:
        the the fill value in the form of a continous array of bytes.

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

        Throws:
        HDFException - should be thrown for errors.
      • SDgetfillvalue

        public static boolean SDgetfillvalue​(int sdsid,
                                             java.lang.Object[] theFillValue)
                                      throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        theFillValue - OUT: Object[1], one object of appropriate type
        Returns:
        the the data in the Java array: theFillValue[0] = fillValue

        Note: the routine calls SDgetinfo to determine the correct type, reads the data as bytes, and converts to the appropriate Java object.

        Throws:
        HDFException - should be thrown for errors.
      • SDgetrange

        public static boolean SDgetrange​(int sdsid,
                                         byte[] max,
                                         byte[] min)
                                  throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        max - OUT: byte[], max value, as bytes
        min - OUT: byte[], min value, as bytes
        Returns:
        the the max and min values in the form of a continous array of bytes.

        NOTE: to read into Java doubles, use the alternative routine below.

        Throws:
        HDFException - should be thrown for errors.
      • SDgetrange

        public static boolean SDgetrange​(int sdsid,
                                         double[] maxmin)
                                  throws HDFException
        Parameters:
        sdsid - IN: id of the SDS as returned by SDselect
        maxmin - OUT: double[2], the max and min values converted to doubles
        Returns:
        the the data in the Java array: maxmin[0] = max, maxmin[1] = min

        Note: the routine calls SDgetinfo to determine the correct type, reads the data as bytes, and converts to the double.

        Throws:
        HDFException - should be thrown for errors.
      • SDcreate

        public static int SDcreate​(int sd_id,
                                   java.lang.String name,
                                   int number_type,
                                   int rank,
                                   int[] dimsizes)
                            throws HDFException
        Throws:
        HDFException
      • SDsetattr

        public static boolean SDsetattr​(int s_id,
                                        java.lang.String attr_name,
                                        int num_type,
                                        int count,
                                        byte[] values)
                                 throws HDFException
        Throws:
        HDFException
      • SDsetattr

        public static boolean SDsetattr​(int s_id,
                                        java.lang.String attr_name,
                                        int num_type,
                                        int count,
                                        java.lang.Object theValues)
                                 throws HDFException
        Throws:
        HDFException
      • SDsetcal

        public static boolean SDsetcal​(int sds_id,
                                       double cal,
                                       double cal_err,
                                       double offset,
                                       double offset_err,
                                       int number_type)
                                throws HDFException
        Throws:
        HDFException
      • SDsetdatastrs

        public static boolean SDsetdatastrs​(int sds_id,
                                            java.lang.String label,
                                            java.lang.String unit,
                                            java.lang.String format,
                                            java.lang.String coordsys)
                                     throws HDFException
        Throws:
        HDFException
      • SDsetdimname

        public static boolean SDsetdimname​(int dim_id,
                                           java.lang.String dim_name)
                                    throws HDFException
        Throws:
        HDFException
      • SDsetdimscale

        public static boolean SDsetdimscale​(int dim_id,
                                            int count,
                                            int number_type,
                                            byte[] data)
                                     throws HDFException
        Parameters:
        dim_id - IN: id of a dimension
        count - IN: number of values
        number_type - IN: number type of the values
        data - IN: byte[], the values, in an array of bytes.
        Returns:
        true on success
        Throws:
        HDFException - should 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.

      • SDsetdimscale

        public static boolean SDsetdimscale​(int dim_id,
                                            int count,
                                            int number_type,
                                            java.lang.Object theData)
                                     throws HDFException
        Parameters:
        dim_id - IN: id of a dimension
        count - IN: number of values
        number_type - IN: number type of the values
        theData - OUT: Object, a Java array of appropriate type and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDsetdimstrs

        public static boolean SDsetdimstrs​(int dim_id,
                                           java.lang.String label,
                                           java.lang.String unit,
                                           java.lang.String format)
                                    throws HDFException
        Throws:
        HDFException
      • SDsetexternalfile

        public static boolean SDsetexternalfile​(int sds_id,
                                                java.lang.String filename,
                                                int offset)
                                         throws HDFException
        Throws:
        HDFException
      • SDsetfillvalue

        public static boolean SDsetfillvalue​(int sds_id,
                                             byte[] fill_val)
                                      throws HDFException
        Parameters:
        sds_id - IN: id of a dataset
        fill_val - IN: byte[], the fill values in an array of bytes.
        Returns:
        true on success
        Throws:
        HDFException - should 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.

      • SDsetfillvalue

        public static boolean SDsetfillvalue​(int sds_id,
                                             java.lang.Object the_fill_val)
                                      throws HDFException
        Parameters:
        sds_id - IN: id of a dataset
        the_fill_val - IN: Object, a Java object of appropriate type
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDsetrange

        public static boolean SDsetrange​(int sdsid,
                                         byte[] max,
                                         byte[] min)
                                  throws HDFException
        Parameters:
        sdsid - IN: id of a dataset
        max - IN: byte[], the max value in an array of bytes
        min - IN: byte[], the min value in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should 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.

      • SDsetrange

        public static boolean SDsetrange​(int sdsid,
                                         java.lang.Object max,
                                         java.lang.Object min)
                                  throws HDFException
        Parameters:
        sdsid - IN: id of a dataset
        max - IN: Object, a Java object of appropriate type
        min - IN: Object, a Java object of appropriate type
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDwritedata

        public static boolean SDwritedata​(int sdsid,
                                          int[] start,
                                          int[] stride,
                                          int[] count,
                                          byte[] data)
                                   throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        start - IN: int[], start
        stride - IN: int[], stride
        count - IN: int[], count
        data - IN: byte[], data in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDwritedata

        public static boolean SDwritedata​(int sdsid,
                                          int[] start,
                                          int[] stride,
                                          int[] count,
                                          java.lang.Object theData)
                                   throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        start - IN: int[], start
        stride - IN: int[], stride
        count - IN: int[], count
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDsetnbitdataset

        public static boolean SDsetnbitdataset​(int id,
                                               int start_bit,
                                               int bit_len,
                                               int sign_ext,
                                               int fill_one)
                                        throws HDFException
        Throws:
        HDFException
      • SDsetcompress

        public static boolean SDsetcompress​(int id,
                                            int type,
                                            HDFCompInfo cinfo)
                                     throws HDFException
        Parameters:
        id - IN: the SD identifier returned by SDselect
        type - IN: the type of compression
        cinfo - IN: HDFCompInfo, the compression info
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDgetcompress

        @Deprecated
        public static boolean SDgetcompress​(int id,
                                            HDFCompInfo cinfo)
                                     throws HDFException
        Deprecated.
        As of HDF 4.2.9, replaced by SDgetcompinfo(int, HDFCompInfo)
        Parameters:
        id - IN: the SD identifier returned by SDselect
        cinfo - IN: HDFCompInfo, the compression info
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDsetaccesstype

        public static boolean SDsetaccesstype​(int id,
                                              int accesstype)
                                       throws HDFException
        Throws:
        HDFException
      • SDsetblocksize

        public static boolean SDsetblocksize​(int sdsid,
                                             int block_size)
                                      throws HDFException
        Throws:
        HDFException
      • SDsetfillmode

        public static boolean SDsetfillmode​(int sdsid,
                                            boolean fill_enable)
                                     throws HDFException
        Parameters:
        sdsid - IN: the SD id
        fill_enable - IN: boolean, true calls library with SD_FILL, false calls library with SD_NOFILL
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.
      • SDsetfillmode

        public static boolean SDsetfillmode​(int sdsid,
                                            int fillmode)
                                     throws HDFException
        Throws:
        HDFException
      • SDsetdimval_comp

        public static boolean SDsetdimval_comp​(int dimid,
                                               int comp_mode)
                                        throws HDFException
        Throws:
        HDFException
      • SDsetchunk

        public static boolean SDsetchunk​(int sdsid,
                                         HDFChunkInfo chunk_def,
                                         int flags)
                                  throws HDFException
        Parameters:
        sdsid - IN: the SD identifier returned by SDselect
        chunk_def - IN: HDFChunkInfo, the chunking info
        flags - IN: the type of chunking
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDgetchunkinfo

        public static boolean SDgetchunkinfo​(int sdsid,
                                             HDFChunkInfo chunk_def,
                                             int[] clflags)
                                      throws HDFException
        Parameters:
        sdsid - IN: the SD identifier returned by SDselect
        chunk_def - OUT: HDFChunkInfo, the chunking info
        clflags - OUT: int[1], the type of chunking
        Returns:
        c_info contains information about the chunking method, clflags[0] == the chunking flags

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

        Throws:
        HDFException - should be thrown for errors.
      • SDreadchunk

        public static boolean SDreadchunk​(int sdsid,
                                          int[] origin,
                                          byte[] theData)
                                   throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        origin - IN: int[], origin
        theData - OUT: byte[], the data in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDreadchunk

        public static boolean SDreadchunk​(int sdsid,
                                          int[] origin,
                                          java.lang.Object theData)
                                   throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        origin - IN: int[], origin
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDsetchunkcache

        public static int SDsetchunkcache​(int sdsid,
                                          int maxcache,
                                          int flags)
                                   throws HDFException
        Throws:
        HDFException
      • SDwritechunk

        public static boolean SDwritechunk​(int sdsid,
                                           int[] origin,
                                           byte[] data)
                                    throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        origin - IN: int[], origin
        data - IN: byte[], data to be written, in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • SDwritechunk

        public static boolean SDwritechunk​(int sdsid,
                                           int[] origin,
                                           java.lang.Object theData)
                                    throws HDFException
        Parameters:
        sdsid - IN: the SD interface id, returned by SDselect
        origin - IN: int[], origin
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors.

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

      • VFfieldesize

        public static int VFfieldesize​(int vdata_id,
                                       int field_index)
                                throws HDFException
        Throws:
        HDFException
      • VFfieldisize

        public static int VFfieldisize​(int vdata_id,
                                       int field_index)
                                throws HDFException
        Throws:
        HDFException
      • VFfieldname

        public static java.lang.String VFfieldname​(int vdata_id,
                                                   int field_index)
                                            throws HDFException
        Throws:
        HDFException
      • VFfieldorder

        public static int VFfieldorder​(int vdata_id,
                                       int field_index)
                                throws HDFException
        Throws:
        HDFException
      • VFfieldtype

        public static int VFfieldtype​(int vdata_id,
                                      int field_index)
                               throws HDFException
        Throws:
        HDFException
      • VHmakegroup

        public static int VHmakegroup​(int file_id,
                                      int[] tag_array,
                                      int[] ref_array,
                                      int n_objects,
                                      java.lang.String vgroup_name,
                                      java.lang.String vgroup_class)
                               throws HDFException
        Throws:
        HDFException
      • VHstoredata

        public static int VHstoredata​(int file_id,
                                      java.lang.String fieldname,
                                      byte[] buf,
                                      int n_records,
                                      int data_type,
                                      java.lang.String vdata_name,
                                      java.lang.String vdata_class)
                               throws HDFException
        Parameters:
        file_id - IN: the SD interface id, returned by SDselect
        fieldname - IN: String, the name of the field to be filled
        buf - IN: byte[], data to be written, in an array of bytes
        n_records - IN: int, the number of records being written
        data_type - IN: int, the number type of the data
        vdata_name - IN: String, the name of the Vdata
        vdata_class - IN: String, the class of the Vdata
        Returns:
        negative on failure
        Throws:
        HDFException - should be thrown for errors.

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

      • VHstoredata

        public static int VHstoredata​(int file_id,
                                      java.lang.String fieldname,
                                      java.lang.Object thebuf,
                                      int n_records,
                                      int data_type,
                                      java.lang.String vdata_name,
                                      java.lang.String vdata_class)
                               throws HDFException
        Parameters:
        file_id - IN: the SD interface id, returned by SDselect
        fieldname - IN: String, the name of the field to be filled
        thebuf - IN: Object, data to be written, in a Java array of appropriate type and size
        n_records - IN: int, the number of records being written
        data_type - IN: int, the number type of the data
        vdata_name - IN: String, the name of the Vdata
        vdata_class - IN: String, the class of the Vdata
        Returns:
        negative on failure
        Throws:
        HDFException - should be thrown for errors.

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

      • VHstoredatam

        public static int VHstoredatam​(int file_id,
                                       java.lang.String fieldname,
                                       byte[] buf,
                                       int n_records,
                                       int data_type,
                                       java.lang.String vdata_name,
                                       java.lang.String vdata_class,
                                       int order)
                                throws HDFException
        Parameters:
        file_id - IN: the SD interface id, returned by SDselect
        fieldname - IN: String, the name of the field to be filled
        buf - IN: byte[], data to be written, in an array of bytes
        n_records - IN: int, the number of records being written
        data_type - IN: int, the number type of the data
        vdata_name - IN: String, the name of the Vdata
        vdata_class - IN: String, the class of the Vdata
        order - IN: int, the number of components per field
        Returns:
        negative on failure
        Throws:
        HDFException - should be thrown for errors.

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

      • VHstoredatam

        public static int VHstoredatam​(int file_id,
                                       java.lang.String fieldname,
                                       java.lang.Object buf,
                                       int n_records,
                                       int data_type,
                                       java.lang.String vdata_name,
                                       java.lang.String vdata_class,
                                       int order)
                                throws HDFException
        Parameters:
        file_id - IN: the SD interface id, returned by SDselect
        fieldname - IN: String, the name of the field to be filled
        buf - IN: Object, data to be written, in a Java array of appropriate type, dimension, and size
        n_records - IN: int, the number of records being written
        data_type - IN: int, the number type of the data
        vdata_name - IN: String, the name of the Vdata
        vdata_class - IN: String, the class of the Vdata
        order - IN: int, the number of components per field
        Returns:
        negative on failure
        Throws:
        HDFException - should be thrown for errors.

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

      • Vattach

        public static int Vattach​(int fid,
                                  int vgroup_ref,
                                  java.lang.String access)
                           throws HDFException
        Throws:
        HDFException
      • Vgetclass

        public static void Vgetclass​(int vgroup_id,
                                     java.lang.String[] hdfclassname)
                              throws HDFException
        Parameters:
        vgroup_id - IN: the Vgroup id
        hdfclassname - OUT: String[1], the HDF class of the vgroup.
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vgetname

        public static void Vgetname​(int vgroup_id,
                                    java.lang.String[] hdfname)
                             throws HDFException
        Parameters:
        vgroup_id - IN: the Vgroup id
        hdfname - OUT: String[1], the name of the vgroup.
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vgettagrefs

        public static int Vgettagrefs​(int vgroup_id,
                                      int[] tags,
                                      int[] refs,
                                      int arraysize)
                               throws HDFException
        Parameters:
        vgroup_id - IN: the Vgroup id
        tags - OUT: int[arraysize], the tags
        refs - OUT: int[arraysize], the refs
        arraysize - IN: int, the number of tags/refs to return
        Returns:
        tags[] = tags for objects 0 - n, refs[] = refs for objects 0 - n
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vgettagref

        public static boolean Vgettagref​(int vgroup_id,
                                         int index,
                                         int[] tagref)
                                  throws HDFException
        Parameters:
        vgroup_id - - IN: the Vgroup id
        index - - IN: the index of the object
        tagref - - OUT: tagref[0]=tag, tagref[1]=ref
        Returns:
        tags[0] = tag for object #index, refs[0] = ref for objects #index
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vinqtagref

        public static boolean Vinqtagref​(int vgroup_id,
                                         int tag,
                                         int ref)
                                  throws HDFException
        Throws:
        HDFException
      • Vlone

        public static int Vlone​(int fid,
                                int[] ref_array,
                                int buffersize)
                         throws HDFException
        Parameters:
        fid - IN: the file identifier returned by Hopen
        ref_array - OUT: int[], the refs for Vdata not part of Vgroups
        buffersize - IN: the max size of the ref_array
        Returns:
        ref_array[] = refs 0 - ...
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vaddtagref

        public static int Vaddtagref​(int vgroup_id,
                                     int tag,
                                     int ref)
                              throws HDFException
        Throws:
        HDFException
      • Vdeletetagref

        public static int Vdeletetagref​(int vgroup_id,
                                        int tag,
                                        int ref)
                                 throws HDFException
        Throws:
        HDFException
      • Vfind

        public static int Vfind​(int file_id,
                                java.lang.String vgroup_name)
                         throws HDFException
        Throws:
        HDFException
      • Vfindclass

        public static int Vfindclass​(int file_id,
                                     java.lang.String vgclassname)
                              throws HDFException
        Throws:
        HDFException
      • Vflocate

        public static int Vflocate​(int key,
                                   java.lang.String vgclassname)
                            throws HDFException
        Throws:
        HDFException
      • Vinquire

        public static boolean Vinquire​(int vgroup_id,
                                       int[] n_entries,
                                       java.lang.String[] vgroup_name)
                                throws HDFException
        Parameters:
        vgroup_id - IN: the Vgroup id
        n_entries - OUT: int[1], the number of objects in the Vgroup
        vgroup_name - OUT: String[1], the name of the Vgroup
        Returns:
        n_entries[0] = number of entries, vgroup_name[0] = the name
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • Vsetclass

        public static boolean Vsetclass​(int vgroup_id,
                                        java.lang.String vgclassname)
                                 throws HDFException
        Throws:
        HDFException
      • Vsetname

        public static boolean Vsetname​(int vgroup_id,
                                       java.lang.String vgname)
                                throws HDFException
        Throws:
        HDFException
      • Vattrinfo

        public static boolean Vattrinfo​(int id,
                                        int index,
                                        java.lang.String[] name,
                                        int[] argv)
                                 throws HDFException
        Parameters:
        id - IN: Vgroup identifier returned by Vattach
        index - IN: the index of the attribute
        name - OUT: String[1], the name of the attribute
        argv - OUT: 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, ,
        Returns:
        name[0] = name, argv[0] = data_type, argv[1] = count, argv[2] = size, argv[3] = nfields, argv[4] = refnum
        Throws:
        HDFException - should be thrown for errors in the HDF library call, but is not yet implemented.
      • Vgetattr

        public static boolean Vgetattr​(int id,
                                       int index,
                                       byte[] data)
                                throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the attribute
        data - OUT: byte[], the data in an array of bytes
        Returns:
        data = the value of the attribute, in an array of bytes
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • Vgetattr

        public static boolean Vgetattr​(int id,
                                       int index,
                                       java.lang.Object theData)
                                throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the attribute
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        data = the value of the attribute, in an array of Java objects
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • Vsetattr

        public static boolean Vsetattr​(int id,
                                       java.lang.String attr_name,
                                       int data_type,
                                       int count,
                                       java.lang.String values)
                                throws HDFException
        Throws:
        HDFException
      • Vsetattr

        public static boolean Vsetattr​(int id,
                                       java.lang.String attr_name,
                                       int data_type,
                                       int count,
                                       byte[] data)
                                throws HDFException
        Parameters:
        id - IN: the Vdata id
        attr_name - IN: String, the name of the attribute
        data_type - IN: int, the number_type of the attribute
        count - IN: the number of values
        data - IN: byte[], the data in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • Vsetattr

        public static boolean Vsetattr​(int id,
                                       java.lang.String attr_name,
                                       int data_type,
                                       int count,
                                       java.lang.Object theData)
                                throws HDFException
        Parameters:
        id - IN: the Vdata id
        attr_name - IN: String, the name of the attribute
        data_type - IN: int, the number_type of the attribute
        count - IN: the number of values
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data to a contiguous array of bytes and then converts writes it.

      • VSQuerycount

        public static boolean VSQuerycount​(int vdata_id,
                                           int[] n_records)
                                    throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        n_records - OUT, int[1], the number of records in the vdata
        Returns:
        n_records[0] == the number of records
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSQueryfields

        public static boolean VSQueryfields​(int vdata_id,
                                            java.lang.String[] fields)
                                     throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        fields - OUT, String[1], the names of the fields
        Returns:
        fields[0] == a comma delimited string with the names of the fields.
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSQueryinterlace

        public static boolean VSQueryinterlace​(int vdata_id,
                                               int[] interlace)
                                        throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        interlace - OUT, int[1], the interlace mode,
        Returns:
        interlace[0] == the number of records, HDFConstants.FULL_INTERLACE or HDFConstants.NO_INTERLACE
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSQueryname

        public static boolean VSQueryname​(int vdata_id,
                                          java.lang.String[] vdata_name)
                                   throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        vdata_name - OUT, String[1], the name of the vdata
        Returns:
        vdata_name[0] == the name
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSQueryvsize

        public static boolean VSQueryvsize​(int vdata_id,
                                           int[] vdata_size)
                                    throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        vdata_size - OUT, int[1], the size of the vdata
        Returns:
        vdata_size[0] == Native size, in bytes, of a record in the vdata
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSattach

        public static int VSattach​(int fid,
                                   int vdata_ref,
                                   java.lang.String access)
                            throws HDFException
        Throws:
        HDFException
      • VSgetclass

        public static void VSgetclass​(int vdata_id,
                                      java.lang.String[] hdfclassname)
                               throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        hdfclassname - OUT, String[1], the class name of the vdata
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSgetname

        public static void VSgetname​(int vdata_id,
                                     java.lang.String[] hdfname)
                              throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        hdfname - OUT, String[1], the name of the vdata
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSfdefine

        public static boolean VSfdefine​(int vdata_id,
                                        java.lang.String fieldname,
                                        int numbertype,
                                        int order)
                                 throws HDFException
        Throws:
        HDFException
      • VSfexist

        public static boolean VSfexist​(int vdata_id,
                                       java.lang.String fields)
                                throws HDFException
        Throws:
        HDFException
      • VSfind

        public static int VSfind​(int file_id,
                                 java.lang.String vdataname)
                          throws HDFException
        Throws:
        HDFException
      • VSsetblocksize

        public static int VSsetblocksize​(int vdata_id,
                                         int blocksize)
                                  throws HDFException
        Throws:
        HDFException
      • VSsetnumblocks

        public static int VSsetnumblocks​(int vdata_id,
                                         int numblocks)
                                  throws HDFException
        Throws:
        HDFException
      • VSgetfields

        public static int VSgetfields​(int vdata_id,
                                      java.lang.String[] fieldname)
                               throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        fieldname - OUT, String[1], the names of the fields
        Returns:
        fieldname[0] == a comma delimited string with the names of the fields.
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSinquire

        public static boolean VSinquire​(int vdata_id,
                                        int[] iargs,
                                        java.lang.String[] sargs)
                                 throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        iargs - OUT, int[3], n_records, interlace, vdata_size
        sargs - OUT, String[2], names the dataset, fields
        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.

        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSinquire

        public static boolean VSinquire​(int vdata_id,
                                        int[] iargs)
                                 throws HDFException
        Parameters:
        vdata_id - IN, vdata id as returned by VSattach
        iargs - OUT, int[2], block_size, num_blocks
        Returns:
        iargs[0] = blocksize, iargs[1] = num_blocks

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

        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSlone

        public static int VSlone​(int fid,
                                 int[] ref_array,
                                 int buffersize)
                          throws HDFException
        Parameters:
        fid - IN, File identifier returned by Hopen
        ref_array - OUT, int[?], the refs
        buffersize - IN, int, the max number of refs to return.
        Returns:
        ref_array contains refs. The Java API ignores the buffersize argument, returns as many as possible.
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSread

        public static int VSread​(int vdata_id,
                                 byte[] databuf,
                                 int nrecord,
                                 int interlace)
                          throws HDFException
        Parameters:
        vdata_id - IN: the Vdata id
        databuf - OUT: byte[], the data in an array of bytes
        nrecord - IN: int, number of records
        interlace - IN: int, interlace
        Returns:
        the number of elements read (0 or a +ve integer)
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSread

        public static int VSread​(int vdata_id,
                                 java.lang.Object theData,
                                 int nrecord,
                                 int interlace)
                          throws HDFException
        Parameters:
        vdata_id - IN: the Vdata id
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        nrecord - IN: int, number of records
        interlace - IN: int, interlace
        Returns:
        the number of elements read (0 or a +ve integer)
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSsetfields

        public static boolean VSsetfields​(int vdata_id,
                                          java.lang.String fields)
                                   throws HDFException
        Throws:
        HDFException
      • VSsetinterlace

        public static boolean VSsetinterlace​(int vdata_id,
                                             int interlace)
                                      throws HDFException
        Throws:
        HDFException
      • VSsizeof

        public static int VSsizeof​(int vdata_id,
                                   java.lang.String fields)
                            throws HDFException
        Throws:
        HDFException
      • VSappendable

        public static boolean VSappendable​(int vkey,
                                           int block_size)
                                    throws HDFException
        Throws:
        HDFException
      • VSfindclass

        public static int VSfindclass​(int file_id,
                                      java.lang.String vgclass)
                               throws HDFException
        Throws:
        HDFException
      • VSsetclass

        public static void VSsetclass​(int vdata_id,
                                      java.lang.String vdata_class)
                               throws HDFException
        Throws:
        HDFException
      • VSsetexternalfile

        public static boolean VSsetexternalfile​(int vkey,
                                                java.lang.String filename,
                                                int offset)
                                         throws HDFException
        Throws:
        HDFException
      • VSsetname

        public static void VSsetname​(int vdata_id,
                                     java.lang.String vdata_name)
                              throws HDFException
        Throws:
        HDFException
      • VSwrite

        public static int VSwrite​(int vdata_id,
                                  byte[] databuf,
                                  int n_records,
                                  int interlace)
                           throws HDFException
        Parameters:
        vdata_id - IN: the Vdata id
        databuf - IN: byte[], the data in an array of bytes
        n_records - IN: int, number of records
        interlace - IN: int, interlace
        Returns:
        the number of elements written (0 or a +ve integer)
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSwrite

        public static int VSwrite​(int vdata_id,
                                  java.lang.Object databuf,
                                  int n_records,
                                  int interlace)
                           throws HDFException
        Parameters:
        vdata_id - IN: the Vdata id
        databuf - IN: Object, a Java array of appropriate type, dimensions, and size.
        n_records - IN: int, number of records
        interlace - IN: int, interlace
        Returns:
        the number of elements written (0 or a +ve integer)
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Important Note: 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.

        Note: converts the data into a contiguous array of bytes and then writes it

      • VSattrinfo

        public static boolean VSattrinfo​(int id,
                                         int index,
                                         int attr_index,
                                         java.lang.String[] name,
                                         int[] argv)
                                  throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: int, the index of the attribute
        attr_index - IN: int, the index of the attribute
        name - OUT: String[1], the name of the attribute
        argv - OUT: 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,
        Returns:
        name[0] = name, argv[0] = data_type, argv[1] = count, argv[2] = size
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSfindex

        public static int VSfindex​(int id,
                                   java.lang.String name,
                                   int[] findex)
                            throws HDFException
        Parameters:
        id - IN: the Vdata id
        name - IN: the name of the attribute
        findex - IN: int[1], the index of the attribute
        Returns:
        findex[0] = the index
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • VSfindattr

        public static int VSfindattr​(int id,
                                     int index,
                                     java.lang.String name)
                              throws HDFException
        Throws:
        HDFException
      • VSgetattr

        public static boolean VSgetattr​(int id,
                                        int index,
                                        int attr_index,
                                        byte[] data)
                                 throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the vdata
        attr_index - IN: the index of the attribute
        data - OUT: byte[], the data in an array of bytes
        Returns:
        data = the value of the attribute, in an array of bytes
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSgetattr

        public static boolean VSgetattr​(int id,
                                        int index,
                                        int attr_index,
                                        java.lang.Object theData)
                                 throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the vdata
        attr_index - IN: the index of the attribute
        theData - OUT: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        data = the value of the attribute, in an array of Java objects
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSsetattr

        public static boolean VSsetattr​(int id,
                                        int index,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        java.lang.String values)
                                 throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the vdata
        attr_name - IN: String, the name of the attribute
        data_type - IN: int, the number_type of the attribute
        count - IN: the number of values
        values - IN: String, the data in an String
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSsetattr

        public static boolean VSsetattr​(int id,
                                        int index,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        byte[] values)
                                 throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the vdata
        attr_name - IN: String, the name of the attribute
        data_type - IN: int, the number_type of the attribute
        count - IN: the number of values
        values - IN: byte[], the data in an array of bytes
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • VSsetattr

        public static boolean VSsetattr​(int id,
                                        int index,
                                        java.lang.String attr_name,
                                        int data_type,
                                        int count,
                                        java.lang.Object theData)
                                 throws HDFException
        Parameters:
        id - IN: the Vdata id
        index - IN: the index of the vdata
        attr_name - IN: String, the name of the attribute
        data_type - IN: int, the number_type of the attribute
        count - IN: the number of values
        theData - IN: Object, a Java array of appropriate type, dimensions, and size.
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data to a contiguous array of bytes and then converts writes it.

      • DF24getdims

        public static boolean DF24getdims​(java.lang.String fileName,
                                          int[] argv)
                                   throws HDFException
        Parameters:
        fileName - IN: String, the file
        argv - OUT: int[3], the width, height, and interlace mode
        Returns:
        argv[0] = width, argv[1] = height, argv[2] = interlace
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • DF24getimage

        public static boolean DF24getimage​(java.lang.String fileName,
                                           byte[] imagedata,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        fileName - IN: String, the file
        imagedata - OUT: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        data = the image in an array of bytes
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DF24getimage

        public static boolean DF24getimage​(java.lang.String fileName,
                                           java.lang.Object theImagedata,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        fileName - IN: String, the file
        theImagedata - OUT: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        data = the value of the attribute, in an array of Java objects
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DF24readref

        public static boolean DF24readref​(java.lang.String filename,
                                          int ref)
                                   throws HDFException
        Throws:
        HDFException
      • DF24addimage

        public static boolean DF24addimage​(java.lang.String filename,
                                           byte[] image,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        image - IN: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DF24addimage

        public static boolean DF24addimage​(java.lang.String filename,
                                           java.lang.Object theImage,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        theImage - IN: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data into a contiguous array of bytes and then writes it to the file

      • DF24putimage

        public static boolean DF24putimage​(java.lang.String filename,
                                           byte[] image,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        image - IN: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DF24putimage

        public static boolean DF24putimage​(java.lang.String filename,
                                           java.lang.Object theImage,
                                           int width,
                                           int height)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        theImage - IN: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data into a contiguous array of bytes and then writes it to the file

      • DF24setcompress

        public static boolean DF24setcompress​(int type,
                                              HDFCompInfo cinfo)
                                       throws HDFException
        Parameters:
        type - IN: int, the type of compression
        cinfo - IN: HDFCompInfo, the compression parameters
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • DFR8getdims

        public static boolean DFR8getdims​(java.lang.String fileName,
                                          int[] argv,
                                          boolean[] haspalette)
                                   throws HDFException
        Parameters:
        fileName - IN: String, the file
        argv - OUT: int[2], the width and height
        haspalette - OUT: boolean[1], has a palette
        Returns:
        argv[0] = width, argv[1] = height, haspalette[0] = palette
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • DFR8getimage

        public static boolean DFR8getimage​(java.lang.String fileName,
                                           byte[] imagedata,
                                           int width,
                                           int height,
                                           byte[] palette)
                                    throws HDFException
        Parameters:
        fileName - IN: String, the file
        imagedata - OUT: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        palette - OUT: byte[], the color look up table
        Returns:
        data = imagedata: the image in an array of bytes, palette: the look up table, in an array of bytes
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DFR8getimage

        public static boolean DFR8getimage​(java.lang.String fileName,
                                           java.lang.Object theImagedata,
                                           int width,
                                           int height,
                                           byte[] palette)
                                    throws HDFException
        Parameters:
        fileName - IN: String, the file
        theImagedata - OUT: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        palette - OUT: byte[], the color look up table
        Returns:
        data = theImagedata: the value of the attribute, in an array of Java objects palette: the look up table, in an array of bytes
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DFR8readref

        public static boolean DFR8readref​(java.lang.String filename,
                                          int ref)
                                   throws HDFException
        Throws:
        HDFException
      • DFR8addimage

        public static boolean DFR8addimage​(java.lang.String filename,
                                           byte[] image,
                                           int width,
                                           int height,
                                           short compress)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        image - IN: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        compress - IN: short, the type of compression
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DFR8addimage

        public static boolean DFR8addimage​(java.lang.String filename,
                                           java.lang.Object theImage,
                                           int width,
                                           int height,
                                           short compress)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        theImage - IN: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        compress - IN: short, the type of compression
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data into a contiguous array of bytes and then writes it to the file

      • DFR8putimage

        public static boolean DFR8putimage​(java.lang.String filename,
                                           byte[] image,
                                           int width,
                                           int height,
                                           short compress)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        image - IN: byte[], the image, in an array of bytes
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        compress - IN: short, the type of compression
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

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

      • DFR8putimage

        public static boolean DFR8putimage​(java.lang.String filename,
                                           java.lang.Object theImage,
                                           int width,
                                           int height,
                                           short compress)
                                    throws HDFException
        Parameters:
        filename - IN: String, the file
        theImage - IN: Object, the image, in a java array of appropriate size and type
        width - IN: int, the width of the image
        height - IN: int, the height of the image
        compress - IN: short, the type of compression
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.

        Note: converts the data into a contiguous array of bytes and then writes it to the file

      • DFR8setcompress

        public static boolean DFR8setcompress​(int type,
                                              HDFCompInfo cinfo)
                                       throws HDFException
        DFR8setcompress sets compression scheme for 8-bit image
        Parameters:
        type - IN: int, the type of compression
        cinfo - IN: HDFCompInfo, the compression parameters
        Returns:
        true on success
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • DFR8getpalref

        public static boolean DFR8getpalref​(short[] palref)
                                     throws HDFException
        Parameters:
        palref - OUT: short[1], the HDF ref of the palette
        Returns:
        palref[0] = the ref of the palette
        Throws:
        HDFException - should be thrown for errors in the HDF library call.
      • DFR8writeref

        public static boolean DFR8writeref​(java.lang.String filename,
                                           short ref)
                                    throws HDFException
        Throws:
        HDFException
      • HCget_config_info

        public static int HCget_config_info​(int coder_type)
                                     throws HDFException
        New API for hdf-42r1
        Parameters:
        coder_type - comp_coder_t enum for determining which type of encoding is being done
        Returns:
        the compression config info value
        Throws:
        HDFException - should be thrown for errors in the HDF library call, but is not yet implemented.