All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.hdf.hdflib.HDFLibrary

java.lang.Object
   |
   +----ncsa.hdf.hdflib.HDFLibrary

public class HDFLibrary
extends Object

This is the Java interface for the HDF 4.1 library

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

For details of the HDF libraries, see the HDF Documentation at: http://hdf.ncsa.uiuc.edu


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 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: :\b> ncsa.hdf.hdflib.HDFChunkInfo, and

ncsa.hdf.hdflib.HDFCompInfo.



Constructor Index

 o HDFLibrary()

Method Index

 o ANannlen(int)
 o ANannlist(int, int, int, int, int[])
 o ANatype2tag(int)
 o ANcreate(int, short, short, int)
 o ANcreatef(int, int)
 o ANdestroy()
 o ANend(int)
 o ANendaccess(int)
 o ANfileinfo(int, int[])
 o ANget_tagref(int, int, int, short[])
 o ANid2tagref(int, short[])
 o ANnumann(int, int, short, short)
 o ANreadann(int, String[], int)
 o ANselect(int, int, int)
 o ANstart(int)
 o ANtag2atype(short)
 o ANtagref2id(int, short, short)
 o ANwriteann(int, String, int)
 o DF24addimage(String, byte[], int, int)
 o DF24addimage(String, Object, int, int)
 o DF24getdims(String, int[])
 o DF24getimage(String, byte[], int, int)
 o DF24getimage(String, Object, int, int)
 o DF24lastref()
 o DF24nimages(String)
 o DF24putimage(String, byte[], int, int)
 o DF24putimage(String, Object, int, int)
 o DF24readref(String, int)
 o DF24reqil(int)
 o DF24restart()
 o DF24setcompress(int, HDFCompInfo)
 o DF24setdims(int, int)
 o DF24setil(int)
 o DFKNTsize(int)
 o DFPaddpal(String, byte[])
 o DFPgetpal(String, byte[])
 o DFPlastref()
 o DFPnpals(String)
 o DFPputpal(String, byte[], boolean, String)
 o DFPputpal(String, byte[], int, String)
 o DFPreadref(String, short)
 o DFPrestart()
 o DFPwriteref(String, short)
 o DFR8addimage(String, byte[], int, int, short)
 o DFR8addimage(String, Object, int, int, short)
 o DFR8getdims(String, int[], boolean[])
 o DFR8getimage(String, byte[], int, int, byte[])
 o DFR8getimage(String, Object, int, int, byte[])
 o DFR8getpalref(short[])
 o DFR8lastref()
 o DFR8nimages(String)
 o DFR8putimage(String, byte[], int, int, short)
 o DFR8putimage(String, Object, int, int, short)
 o DFR8readref(String, int)
 o DFR8restart()
 o DFR8setcompress(int, HDFCompInfo)
 o DFR8setpalette(byte[])
 o DFR8writeref(String, short)
 o GRattrinfo(int, int, String[], int[])
 o GRcreate(int, String, int, int, int, int[])
 o GRend(int)
 o GRendaccess(int)
 o GRfileinfo(int, int[])
 o GRfindattr(int, String)
 o GRgetattr(int, int, byte[])
 o GRgetattr(int, int, Object)
 o GRgetchunkinfo(int, HDFChunkInfo, int[])
 o GRgetiminfo(int, String[], int[], int[])
 o GRgetlutid(int, int)
 o GRgetlutinfo(int, int[])
 o GRidtoref(int)
 o GRluttoref(int)
 o GRnametoindex(int, String)
 o GRreadimage(int, int[], int[], int[], byte[])
 o GRreadimage(int, int[], int[], int[], Object)
 o GRreadlut(int, byte[])
 o GRreadlut(int, Object)
 o GRreftoindex(int, short)
 o GRreqimageil(int, int)
 o GRreqlutil(int, int)
 o GRselect(int, int)
 o GRsetattr(int, String, int, int, byte[])
 o GRsetattr(int, String, int, int, Object)
 o GRsetattr(int, String, int, int, String)
 o GRsetchunk(int, HDFChunkInfo, int)
 o GRsetchunkcache(int, int, int)
 o GRsetcompress(int, int, HDFCompInfo)
 o GRsetexternalfile(int, String, int)
 o GRstart(int)
 o GRwriteimage(int, int[], int[], int[], byte[])
 o GRwriteimage(int, int[], int[], int[], Object)
 o GRwritelut(int, int, int, int, int, byte[])
 o GRwritelut(int, int, int, int, int, Object)
 o Hcache(int, int)
 o Hclose(int)
 o HDFclose(int)
 o HDFopen(String, int, short)
 o HDgetNTdesc(int)
 o HEstring(int)
 o HEvalue(int)
 o Hgetfileversion(int, int[], String[])
Note: the version of an HDF file is not well defined, it is not recommended that programs rely on these numbers.
 o Hgetlibversion(int[], String[])
 o Hishdf(String)
 o Hnumber(int)
 o Hopen(String)
 o Hopen(String, int)
 o Hsetaccesstype(int, int)
 o Hsync(int)
 o HXsetcreatedir(String)
 o HXsetdir(String)
 o SDattrinfo(int, int, String[], int[])
 o SDcreate(int, String, int, int, int[])
 o SDdiminfo(int, String[], int[])
 o SDend(int)
 o SDendaccess(int)
 o SDfileinfo(int, int[])
 o SDfindattr(int, String)
 o SDgetcal(int, double[], int[])
 o SDgetchunkinfo(int, HDFChunkInfo, int[])
 o SDgetdatastrs(int, String[], int)
 o SDgetdimid(int, int)
 o SDgetdimscale(int, byte[])
 o SDgetdimscale(int, Object)
 o SDgetdimstrs(int, String[], int)
 o SDgetfillvalue(int, byte[])
 o SDgetfillvalue(int, Object[])
 o SDgetinfo(int, String[], int[], int[])
 o SDgetrange(int, byte[], byte[])
 o SDgetrange(int, double[])
 o SDidtoref(int)
 o SDiscoordvar(int)
 o SDisdimval_bwcomp(int)
 o SDisrecord(int)
 o SDnametoindex(int, String)
 o SDreadattr(int, int, byte[])
 o SDreadattr(int, int, Object)
 o SDreadchunk(int, int[], byte[])
 o SDreadchunk(int, int[], Object)
 o SDreaddata(int, int[], int[], int[], byte[])
 o SDreaddata(int, int[], int[], int[], Object)
 o SDreftoindex(int, int)
 o SDselect(int, int)
 o SDsetaccesstype(int, int)
 o SDsetattr(int, String, int, int, byte[])
 o SDsetattr(int, String, int, int, Object)
 o SDsetblocksize(int, int)
 o SDsetcal(int, double, double, double, double, int)
 o SDsetchunk(int, HDFChunkInfo, int)
 o SDsetchunkcache(int, int, int)
 o SDsetcompress(int, int, HDFCompInfo)
 o SDsetdatastrs(int, String, String, String, String)
 o SDsetdimname(int, String)
 o SDsetdimscale(int, int, int, byte[])
 o SDsetdimscale(int, int, int, Object)
 o SDsetdimstrs(int, String, String, String)
 o SDsetdimval_comp(int, int)
 o SDsetexternalfile(int, String, int)
 o SDsetfillmode(int, boolean)
 o SDsetfillmode(int, int)
 o SDsetfillvalue(int, byte[])
 o SDsetfillvalue(int, Object)
 o SDsetnbitdataset(int, int, int, int, int)
 o SDsetrange(int, byte[], byte[])
 o SDsetrange(int, Object, Object)
 o SDstart(String, int)
 o SDwritechunk(int, int[], byte[])
 o SDwritechunk(int, int[], Object)
 o SDwritedata(int, int[], int[], int[], byte[])
 o SDwritedata(int, int[], int[], int[], Object)
 o Vaddtagref(int, int, int)
 o Vattach(int, int, String)
 o Vattrinfo(int, int, String[], int[])
 o Vdetach(int)
 o Vend(int)
 o VFfieldesize(int, int)
 o VFfieldisize(int, int)
 o VFfieldname(int, int)
 o VFfieldorder(int, int)
 o VFfieldtype(int, int)
 o Vfind(int, String)
 o Vfindattr(int, String)
 o Vfindclass(int, String)
 o Vflocate(int, String)
 o VFnfields(int)
 o Vgetattr(int, int, byte[])
 o Vgetattr(int, int, Object)
 o Vgetclass(int, String[])
 o Vgetid(int, int)
 o Vgetname(int, String[])
 o Vgetnext(int, int)
 o Vgettagref(int, int, int[])
 o Vgettagrefs(int, int[], int[], int)
 o Vgetversion(int)
 o VHmakegroup(int, int[], int[], int, String, String)
 o VHstoredata(int, String, byte[], int, int, String, String)
 o VHstoredata(int, String, Object, int, int, String, String)
 o VHstoredatam(int, String, byte[], int, int, String, String, int)
 o VHstoredatam(int, String, Object, int, int, String, String, int)
 o Vinqtagref(int, int, int)
 o Vinquire(int, int[], String[])
 o Vinsert(int, int)
 o Visvg(int, int)
 o Visvs(int, int)
 o Vlone(int, int[], int)
 o Vnattrs(int)
 o Vnrefs(int, int)
 o Vntagrefs(int)
 o VQueryref(int)
 o VQuerytag(int)
 o VSappendable(int, int)
 o VSattach(int, int, String)
 o VSattrinfo(int, int, String[], int[])
 o VSdetach(int)
 o VSelts(int)
 o Vsetattr(int, String, int, int, byte[])
 o Vsetattr(int, String, int, int, Object)
 o Vsetattr(int, String, int, int, String)
 o Vsetclass(int, String)
 o Vsetname(int, String)
 o VSfdefine(int, String, int, int)
 o VSfexist(int, String)
 o VSfind(int, String)
 o VSfindattr(int, int, String)
 o VSfindclass(int, String)
 o VSfindex(int, String, int[])
 o VSfnattrs(int, int)
 o VSgetattr(int, int, int, byte[])
 o VSgetattr(int, int, int, Object)
 o VSgetclass(int, String[])
 o VSgetfields(int, String[])
 o VSgetid(int, int)
 o VSgetinterlace(int)
 o VSgetname(int, String[])
 o VSgetversion(int)
 o VSinquire(int, int[], String[])
 o VSisattr(int)
 o VSlone(int, int[], int)
 o VSnattrs(int)
 o VSQuerycount(int, int[])
 o VSQueryfields(int, String[])
 o VSQueryinterlace(int, int[])
 o VSQueryname(int, String[])
 o VSQueryref(int)
 o VSQuerytag(int)
 o VSQueryvsize(int, int[])
 o VSread(int, byte[], int, int)
 o VSread(int, Object, int, int)
 o VSseek(int, int)
 o VSsetattr(int, int, String, int, int, byte[])
 o VSsetattr(int, int, String, int, int, Object)
 o VSsetattr(int, int, String, int, int, String)
 o VSsetclass(int, String)
 o VSsetexternalfile(int, String, int)
 o VSsetfields(int, String)
 o VSsetinterlace(int, int)
 o VSsetname(int, String)
 o VSsizeof(int, String)
 o Vstart(int)
 o VSwrite(int, byte[], int, int)
 o VSwrite(int, Object, int, int)

Constructors

 o HDFLibrary
 public HDFLibrary()

Methods

 o Hopen
 public int Hopen(String filename) throws HDFException
 o Hopen
 public native int Hopen(String filename,
                         int access) throws HDFException
 o Hclose
 public native boolean Hclose(int fid) throws HDFException
 o Hishdf
 public native boolean Hishdf(String fileName) throws HDFException
 o Hnumber
 public native int Hnumber(int fid) throws HDFException
 o DFKNTsize
 public static native int DFKNTsize(int numbertype) throws HDFException
 o HDgetNTdesc
 public native String HDgetNTdesc(int nt) throws HDFException
 o Hcache
 public native boolean Hcache(int file_id,
                              int cache_switch) throws HDFException
 o Hgetfileversion
 public native boolean Hgetfileversion(int file_id,
                                       int vers[],
                                       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.
 o Hgetlibversion
 public native boolean Hgetlibversion(int vers[],
                                      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.
 o Hsetaccesstype
 public native boolean Hsetaccesstype(int h_id,
                                      int access_type) throws HDFException
 o Hsync
 public native boolean Hsync(int file_id) throws HDFException
 o ANstart
 public native int ANstart(int fid) throws HDFException
 o ANend
 public native boolean ANend(int an_id) throws HDFException
 o ANendaccess
 public native boolean ANendaccess(int an_id) throws HDFException
 o ANfileinfo
 public native 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
 o ANselect
 public native int ANselect(int an_id,
                            int index,
                            int anntype) throws HDFException
 o ANnumann
 public native int ANnumann(int an_id,
                            int anntype,
                            short tag,
                            short ref) throws HDFException
 o ANatype2tag
 public native short ANatype2tag(int antag) throws HDFException
 o ANtag2atype
 public native int ANtag2atype(short anttype) throws HDFException
 o ANannlist
 public native 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
vers - 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
 o ANannlen
 public native int ANannlen(int ann_id) throws HDFException
 o ANreadann
 public native boolean ANreadann(int ann_id,
                                 String annbuf[],
                                 int maxlen) throws HDFException
Parameters:
an_id - IN: the AN interface id, returned by ANstart
annbuf - OUT: String[1], the annotation is returned as annbuf[0].
tag - IN: int, the maximum length of the string.
Returns:
an annotation string: annbuf[0] = the annotation
 o ANcreate
 public native int ANcreate(int an_id,
                            short tag,
                            short ref,
                            int type) throws HDFException
 o ANcreatef
 public native int ANcreatef(int an_id,
                             int type) throws HDFException
 o ANdestroy
 public native boolean ANdestroy() throws HDFException
 o ANget_tagref
 public native 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
 o ANid2tagref
 public native 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
 o ANtagref2id
 public native int ANtagref2id(int an_id,
                               short tag,
                               short ref) throws HDFException
 o ANwriteann
 public native boolean ANwriteann(int ann_id,
                                  String label,
                                  int ann_length) throws HDFException
 o DFPaddpal
 public native boolean DFPaddpal(String filename,
                                 byte palette[]) throws HDFException
 o DFPgetpal
 public native boolean DFPgetpal(String filename,
                                 byte palette[]) throws HDFException
 o DFPlastref
 public native short DFPlastref() throws HDFException
 o DFPnpals
 public native int DFPnpals(String filename) throws HDFException
 o DFPputpal
 public native boolean DFPputpal(String filename,
                                 byte palette[],
                                 int overwrite,
                                 String filemode) throws HDFException
 o DFPputpal
 public boolean DFPputpal(String filename,
                          byte palette[],
                          boolean overwrite,
                          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
 o DFPreadref
 public native boolean DFPreadref(String filename,
                                  short ref) throws HDFException
 o DFPrestart
 public native short DFPrestart() throws HDFException
 o DFPwriteref
 public native boolean DFPwriteref(String filename,
                                   short ref) throws HDFException
 o GRstart
 public native int GRstart(int fid) throws HDFException
 o GRend
 public native boolean GRend(int grid) throws HDFException
 o GRfileinfo
 public native 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
 o GRgetchunkinfo
 public native boolean GRgetchunkinfo(int sdsid,
                                      HDFChunkInfo chunk_def,
                                      int flag[]) throws HDFException
Parameters:
sdsid - IN: the SD identifier returned by SDselect
c_info - 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.

 o GRselect
 public native int GRselect(int grid,
                            int index) throws HDFException
 o GRnametoindex
 public native int GRnametoindex(int grid,
                                 String name) throws HDFException
 o GRgetiminfo
 public native boolean GRgetiminfo(int riid,
                                   String gr_name[],
                                   int args[],
                                   int dim_sizes[]) throws HDFException
Parameters:
grid - IN: the GR interface id, returned by GRstart
args - OUT: int[5], image info: number of components in the image, data type of the image data, interlace mode of the stored image data, sizes of each image dimension , number of attributes assigned to the image
args - 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.

 o GRreadimage
 public native boolean GRreadimage(int riid,
                                   int start[],
                                   int stride[],
                                   int count[],
                                   byte data[]) throws HDFException
Parameters:
grid - IN: the GR interface id, returned by GRstart
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 2D array use the alternative routine below.

 o GRreadimage
 public boolean GRreadimage(int riid,
                            int start[],
                            int stride[],
                            int count[],
                            Object theData) throws HDFException
Parameters:
grid - IN: the GR interface id, returned by GRstart
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.

 o GRendaccess
 public native boolean GRendaccess(int riid) throws HDFException
 o GRidtoref
 public native short GRidtoref(int riid) throws HDFException
 o GRreftoindex
 public native int GRreftoindex(int grid,
                                short ref) throws HDFException
 o GRreqlutil
 public native boolean GRreqlutil(int riid,
                                  int interlace) throws HDFException
 o GRreqimageil
 public native boolean GRreqimageil(int rrid,
                                    int interlace) throws HDFException
 o GRgetlutid
 public native int GRgetlutid(int rrid,
                              int index) throws HDFException
 o GRgetlutinfo
 public native boolean GRgetlutinfo(int lutid,
                                    int argv[])
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
 o GRreadlut
 public native 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.

 o GRreadlut
 public boolean GRreadlut(int lutid,
                          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.

 o GRattrinfo
 public native boolean GRattrinfo(int id,
                                  int index,
                                  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
 o GRgetattr
 public native boolean GRgetattr(int id,
                                 int index,
                                 byte data[]) throws HDFException
Parameters:
id - IN: the GR identifier returned by GRstart
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.

 o GRgetattr
 public boolean GRgetattr(int id,
                          int index,
                          Object theData) throws HDFException
Parameters:
id - IN: the GR identifier returned by GRstart
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.

 o GRfindattr
 public native int GRfindattr(int id,
                              String name) throws HDFException
 o GRcreate
 public native int GRcreate(int gr_id,
                            String name,
                            int ncomp,
                            int data_type,
                            int interlace_mode,
                            int dim_sizes[]) throws HDFException
 o GRluttoref
 public native short GRluttoref(int pal_id) throws HDFException
 o GRsetattr
 public native boolean GRsetattr(int gr_id,
                                 String attr_name,
                                 int data_type,
                                 int count,
                                 String values) throws HDFException
Parameters:
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

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

 o GRsetattr
 public native boolean GRsetattr(int gr_id,
                                 String attr_name,
                                 int data_type,
                                 int count,
                                 byte values[]) throws HDFException
Parameters:
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

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.

 o GRsetattr
 public boolean GRsetattr(int gr_id,
                          String attr_name,
                          int data_type,
                          int count,
                          Object theData) throws HDFException
Parameters:
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: Object -- the value to be written, a Java array of numbers.

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

 o GRsetchunk
 public native boolean GRsetchunk(int sdsid,
                                  HDFChunkInfo chunk_def,
                                  int flags) throws HDFException
Parameters:
sdsid - IN: the SD identifier returned by SDselect
c_info - IN: HDFChunkInfo, the chunking info
flags - IN: the type of chunking

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

 o GRsetchunkcache
 public native int GRsetchunkcache(int sdsid,
                                   int maxcache,
                                   int flags) throws HDFException
 o GRsetcompress
 public native 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

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

 o GRsetexternalfile
 public native boolean GRsetexternalfile(int ri_id,
                                         String filename,
                                         int offset) throws HDFException
 o GRwriteimage
 public native boolean GRwriteimage(int grid,
                                    int start[],
                                    int stride[],
                                    int edge[],
                                    byte data[])
Parameters:
grid - IN: the GR interface id, returned by GRstart
start - IN: int[], start
stride - IN: int[], stride
count - IN: int[], count
data - IN: byte[], data to be written

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

 o GRwriteimage
 public boolean GRwriteimage(int grid,
                             int start[],
                             int stride[],
                             int edge[],
                             Object theData) throws HDFException
Parameters:
grid - IN: the GR interface id, returned by GRstart
start - IN: int[], start
stride - IN: int[], stride
count - IN: int[], count
theData - IN: Object, a Java array of appropriate type, dimensions, and size.

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

 o GRwritelut
 public native 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
data - IN: byte[], palette data to be written--as bytes

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

 o GRwritelut
 public boolean GRwritelut(int pal_id,
                           int ncomp,
                           int data_type,
                           int interlace,
                           int num_entries,
                           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
data - IN: Object, palette data to be written, any number type.

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

 o HDFclose
 public native boolean HDFclose(int file_id) throws HDFException
 o HDFopen
 public native int HDFopen(String filename,
                           int access,
                           short n_dds) throws HDFException
 o HEvalue
 public native short HEvalue(int level) throws HDFException
 o HEstring
 public native String HEstring(int error_code) throws HDFException
 o HXsetcreatedir
 public native boolean HXsetcreatedir(String dir) throws HDFException
 o HXsetdir
 public native boolean HXsetdir(String dir) throws HDFException
 o SDstart
 public native int SDstart(String filename,
                           int accessmode) throws HDFException
 o SDend
 public native boolean SDend(int sdid) throws HDFException
 o SDfileinfo
 public native 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
 o SDselect
 public native int SDselect(int sdid,
                            int index) throws HDFException
 o SDnametoindex
 public native int SDnametoindex(int sdid,
                                 String name) throws HDFException
 o SDgetinfo
 public native boolean SDgetinfo(int sdsid,
                                 String name[],
                                 int dimsizes[],
                                 int argv[]) 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
args - 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.

 o SDreaddata
 public native 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.

 o SDreaddata
 public boolean SDreaddata(int sdsid,
                           int start[],
                           int stride[],
                           int count[],
                           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.

 o SDendaccess
 public native boolean SDendaccess(int sdsid) throws HDFException
 o SDgetdimid
 public native int SDgetdimid(int sdsid,
                              int index) throws HDFException
 o SDdiminfo
 public native boolean SDdiminfo(int dimid,
                                 String name[],
                                 int argv[]) throws HDFException
Parameters:
sdsid - 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
 o SDidtoref
 public native int SDidtoref(int sdsid) throws HDFException
 o SDreftoindex
 public native int SDreftoindex(int sdid,
                                int ref) throws HDFException
 o SDattrinfo
 public native boolean SDattrinfo(int id,
                                  int index,
                                  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
 o SDreadattr
 public native 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.

 o SDreadattr
 public boolean SDreadattr(int id,
                           int index,
                           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.

 o SDfindattr
 public native int SDfindattr(int id,
                              String name) throws HDFException
 o SDiscoordvar
 public native boolean SDiscoordvar(int sdsid) throws HDFException
 o SDgetcal
 public native 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
 o SDgetdatastrs
 public native boolean SDgetdatastrs(int sdsid,
                                     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,
 o SDgetdimstrs
 public native boolean SDgetdimstrs(int dimid,
                                    String argv[],
                                    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
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
 o SDgetdimscale
 public native 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.

 o SDgetdimscale
 public boolean SDgetdimscale(int dimid,
                              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.

 o SDgetfillvalue
 public native 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.

 o SDgetfillvalue
 public boolean SDgetfillvalue(int sdsid,
                               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.

 o SDgetrange
 public native 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
max - OUT: byte[], max 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.

 o SDgetrange
 public 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.

 o SDcreate
 public native int SDcreate(int sd_id,
                            String name,
                            int number_type,
                            int rank,
                            int dimsizes[]) throws HDFException
 o SDisrecord
 public native boolean SDisrecord(int sdsid) throws HDFException
 o SDsetattr
 public native boolean SDsetattr(int s_id,
                                 String attr_name,
                                 int num_type,
                                 int count,
                                 byte values[]) throws HDFException
 o SDsetattr
 public boolean SDsetattr(int s_id,
                          String attr_name,
                          int num_type,
                          int count,
                          Object theValues) throws HDFException
 o SDsetcal
 public native boolean SDsetcal(int sds_id,
                                double cal,
                                double cal_err,
                                double offset,
                                double offset_err,
                                int number_type) throws HDFException
 o SDsetdatastrs
 public native boolean SDsetdatastrs(int sds_id,
                                     String label,
                                     String unit,
                                     String format,
                                     String coordsys) throws HDFException
 o SDsetdimname
 public native boolean SDsetdimname(int dim_id,
                                    String dim_name) throws HDFException
 o SDsetdimscale
 public native 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.

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.

 o SDsetdimscale
 public boolean SDsetdimscale(int dim_id,
                              int count,
                              int number_type,
                              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.

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

 o SDsetdimstrs
 public native boolean SDsetdimstrs(int dim_id,
                                    String label,
                                    String unit,
                                    String format) throws HDFException
 o SDsetexternalfile
 public native boolean SDsetexternalfile(int sds_id,
                                         String filename,
                                         int offset) throws HDFException
 o SDsetfillvalue
 public native boolean SDsetfillvalue(int sds_id,
                                      byte fill_val[]) throws HDFException
Parameters:
sds_id - IN: id of a dataset
fill_bal - IN: byte[], the fill values in an array of bytes.

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.

 o SDsetfillvalue
 public boolean SDsetfillvalue(int sds_id,
                               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

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

 o SDsetrange
 public native boolean SDsetrange(int sdsid,
                                  byte max[],
                                  byte min[]) throws HDFException
Parameters:
sds_id - 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

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.

 o SDsetrange
 public boolean SDsetrange(int sdsid,
                           Object max,
                           Object min) throws HDFException
Parameters:
sds_id - IN: id of a dataset
max - IN: Object, a Java object of appropriate type
min - IN: Object, a Java object of appropriate type

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

 o SDwritedata
 public native 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

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

 o SDwritedata
 public boolean SDwritedata(int sdsid,
                            int start[],
                            int stride[],
                            int count[],
                            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.

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

 o SDsetnbitdataset
 public native boolean SDsetnbitdataset(int id,
                                        int start_bit,
                                        int bit_len,
                                        int sign_ext,
                                        int fill_one) throws HDFException
 o SDsetcompress
 public native boolean SDsetcompress(int id,
                                     int type,
                                     HDFCompInfo cinfo) throws HDFException
Parameters:
id - IN: the SD identifier returned by SDselect
comp_type - IN: the type of compression
c_info - IN: HDFCompInfo, the compression info

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

 o SDsetaccesstype
 public native boolean SDsetaccesstype(int id,
                                       int accesstype) throws HDFException
 o SDsetblocksize
 public native boolean SDsetblocksize(int sdsid,
                                      int block_size) throws HDFException
 o SDsetfillmode
 public 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
 o SDsetfillmode
 public native boolean SDsetfillmode(int sdsid,
                                     int fillmode) throws HDFException
 o SDsetdimval_comp
 public native boolean SDsetdimval_comp(int dimid,
                                        int comp_mode) throws HDFException
 o SDisdimval_bwcomp
 public native boolean SDisdimval_bwcomp(int dimid) throws HDFException
 o SDsetchunk
 public native boolean SDsetchunk(int sdsid,
                                  HDFChunkInfo chunk_def,
                                  int flags) throws HDFException
Parameters:
sdsid - IN: the SD identifier returned by SDselect
c_info - IN: HDFChunkInfo, the chunking info
flags - IN: the type of chunking

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

 o SDgetchunkinfo
 public native boolean SDgetchunkinfo(int sdsid,
                                      HDFChunkInfo chunk_def,
                                      int clflags[]) throws HDFException
Parameters:
sdsid - IN: the SD identifier returned by SDselect
c_info - OUT: HDFChunkInfo, the chunking info
flags - 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.

 o SDreadchunk
 public native boolean SDreadchunk(int sdsid,
                                   int origin[],
                                   byte theData[]) throws HDFException
Parameters:
sdsid - IN: the SD interface id, returned by SDselect
origin - IN: int[], origin
data - OUT: byte[], the data in an array of bytes

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

 o SDreadchunk
 public boolean SDreadchunk(int sdsid,
                            int origin[],
                            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.

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

 o SDsetchunkcache
 public native int SDsetchunkcache(int sdsid,
                                   int maxcache,
                                   int flags) throws HDFException
 o SDwritechunk
 public native 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

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

 o SDwritechunk
 public boolean SDwritechunk(int sdsid,
                             int origin[],
                             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.

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

 o VFfieldesize
 public native int VFfieldesize(int vdata_id,
                                int field_index) throws HDFException
 o VFfieldisize
 public native int VFfieldisize(int vdata_id,
                                int field_index) throws HDFException
 o VFfieldname
 public native String VFfieldname(int vdata_id,
                                  int field_index) throws HDFException
 o VFfieldorder
 public native int VFfieldorder(int vdata_id,
                                int field_index) throws HDFException
 o VFfieldtype
 public native int VFfieldtype(int vdata_id,
                               int field_index) throws HDFException
 o VFnfields
 public native int VFnfields(int vkey) throws HDFException
 o VHmakegroup
 public native int VHmakegroup(int file_id,
                               int tag_array[],
                               int ref_array[],
                               int n_objects,
                               String vgroup_name,
                               String vgroup_class) throws HDFException
 o VHstoredata
 public native int VHstoredata(int file_id,
                               String fieldname,
                               byte buf[],
                               int n_records,
                               int data_type,
                               String vdata_name,
                               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

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

 o VHstoredata
 public int VHstoredata(int file_id,
                        String fieldname,
                        Object thebuf,
                        int n_records,
                        int data_type,
                        String vdata_name,
                        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: 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

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

 o VHstoredatam
 public native int VHstoredatam(int file_id,
                                String fieldname,
                                byte buf[],
                                int n_records,
                                int data_type,
                                String vdata_name,
                                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

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

 o VHstoredatam
 public int VHstoredatam(int file_id,
                         String fieldname,
                         Object buf,
                         int n_records,
                         int data_type,
                         String vdata_name,
                         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

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

 o VQueryref
 public native int VQueryref(int vkey) throws HDFException
 o VQuerytag
 public native int VQuerytag(int vkey) throws HDFException
 o VSQuerycount
 public native 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
 o VSQueryfields
 public native boolean VSQueryfields(int vdata_id,
                                     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.
 o VSQueryinterlace
 public native 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
 o VSQueryname
 public native boolean VSQueryname(int vdata_id,
                                   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
 o VSQueryref
 public native int VSQueryref(int vdata_id) throws HDFException
 o VSQuerytag
 public native int VSQuerytag(int vdata_id) throws HDFException
 o VSQueryvsize
 public native 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
 o VSattach
 public native int VSattach(int fid,
                            int vdata_ref,
                            String access) throws HDFException
 o VSdetach
 public native void VSdetach(int vdata_id) throws HDFException
 o VSgetid
 public native int VSgetid(int file_id,
                           int vdata_ref) throws HDFException
 o VSgetclass
 public native void VSgetclass(int vdata_id,
                               String hdfclassname[]) throws HDFException
Parameters:
vdata_id, - IN, vdata id as returned by VSattach
hdfclassname, - OUT, String[1], the class name of the vdata
Returns:
vdata_class[0] == the class name
 o VSgetname
 public native void VSgetname(int vdata_id,
                              String hdfname[]) throws HDFException
Parameters:
vdata_id, - IN, vdata id as returned by VSattach
hdfname, - OUT, String[1], the name of the vdata
Returns:
hdfname[0] == the name
 o VSelts
 public native int VSelts(int vdata_id) throws HDFException
 o VSfdefine
 public native boolean VSfdefine(int vdata_id,
                                 String fieldname,
                                 int numbertype,
                                 int order) throws HDFException
 o VSfexist
 public native boolean VSfexist(int vdata_id,
                                String fields) throws HDFException
 o VSfind
 public native int VSfind(int file_id,
                          String vdataname) throws HDFException
 o VSgetfields
 public native int VSgetfields(int vdata_id,
                               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.
 o VSgetinterlace
 public native int VSgetinterlace(int vdata_id) throws HDFException
 o VSinquire
 public native boolean VSinquire(int vdata_id,
                                 int iargs[],
                                 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.

 o VSlone
 public native 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.
 o VSread
 public native int VSread(int vdata_id,
                          byte databuf[],
                          int nrecord,
                          int interlace) throws HDFException
Parameters:
vdata_id - IN: the Vdata id
data_buf - OUT: byte[], the data in an array of bytes
nrecord - IN: int, number of records
interlace - IN: int, interlace

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

 o VSread
 public int VSread(int vdata_id,
                   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

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

 o VSseek
 public native int VSseek(int vdata_id,
                          int record) throws HDFException
 o VSsetfields
 public native boolean VSsetfields(int vdata_id,
                                   String fields) throws HDFException
 o VSsetinterlace
 public native boolean VSsetinterlace(int vdata_id,
                                      int interlace) throws HDFException
 o VSsizeof
 public native int VSsizeof(int vdata_id,
                            String fields) throws HDFException
 o VSappendable
 public native boolean VSappendable(int vkey,
                                    int block_size) throws HDFException
 o VSfindclass
 public native int VSfindclass(int file_id,
                               String vgclass) throws HDFException
 o VSgetversion
 public native int VSgetversion(int vkey) throws HDFException
 o VSsetclass
 public native void VSsetclass(int vdata_id,
                               String vdata_class) throws HDFException
 o VSsetexternalfile
 public native boolean VSsetexternalfile(int vkey,
                                         String filename,
                                         int offset) throws HDFException
 o VSsetname
 public native void VSsetname(int vdata_id,
                              String vdata_name) throws HDFException
 o VSwrite
 public native int VSwrite(int vdata_id,
                           byte databuf[],
                           int n_records,
                           int interlace) throws HDFException
Parameters:
vdata_id - IN: the Vdata id
data_buf - IN: byte[], the data in an array of bytes
n_records - IN: int, number of records
interlace - IN: int, interlace

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

 o VSwrite
 public int VSwrite(int vdata_id,
                    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

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

 o Vstart
 public native boolean Vstart(int fid) throws HDFException
 o Vattach
 public native int Vattach(int fid,
                           int vgroup_ref,
                           String access) throws HDFException
 o Vdetach
 public native void Vdetach(int vgroup_id) throws HDFException
 o Vend
 public native void Vend(int file_id) throws HDFException
 o Vgetid
 public native int Vgetid(int file_id,
                          int vgroup_ref) throws HDFException
 o Vgetclass
 public native void Vgetclass(int vgroup_id,
                              String hdfclassname[]) throws HDFException
Parameters:
vgroup_id - IN: the Vgroup id
hdfclassname - OUT: String[1], the HDF class of the vgroup.
Returns:
hdfclassname[0] == the hdf class.
 o Vgetname
 public native void Vgetname(int vgroup_id,
                             String hdfname[]) throws HDFException
Parameters:
vgroup_id - IN: the Vgroup id
hdfname - OUT: String[1], the name of the vgroup.
Returns:
hdfname[0] == the name
 o Visvg
 public native boolean Visvg(int vgroup_id,
                             int vgroup_ref) throws HDFException
 o Visvs
 public native boolean Visvs(int vgroup_id,
                             int vdata_ref) throws HDFException
 o Vgettagrefs
 public native 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
 o Vgettagref
 public native 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
tags - OUT: int[1], the tag for the object
refs - OUT: int[1], the ref for the object
Returns:
tags[0] = tag for object #index, refs[0] = ref for objects #index
 o Vntagrefs
 public native int Vntagrefs(int vgroup_id) throws HDFException
 o Vinqtagref
 public native boolean Vinqtagref(int vgroup_id,
                                  int tag,
                                  int ref) throws HDFException
 o Vlone
 public native 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 - ...
 o Vaddtagref
 public native int Vaddtagref(int vgroup_id,
                              int tag,
                              int ref) throws HDFException
 o Vfind
 public native int Vfind(int file_id,
                         String vgroup_name) throws HDFException
 o Vfindclass
 public native int Vfindclass(int file_id,
                              String vgclassname) throws HDFException
 o Vflocate
 public native int Vflocate(int key,
                            String vgclassname) throws HDFException
 o Vgetnext
 public native int Vgetnext(int key,
                            int ref) throws HDFException
 o Vinquire
 public native boolean Vinquire(int vgroup_id,
                                int n_entries[],
                                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
 o Vinsert
 public native int Vinsert(int vgroup_id,
                           int v_id) throws HDFException
 o Vnrefs
 public native int Vnrefs(int key,
                          int ref) throws HDFException
 o Vsetclass
 public native boolean Vsetclass(int vgroup_id,
                                 String vgclassname) throws HDFException
 o Vsetname
 public native boolean Vsetname(int vgroup_id,
                                String vgname) throws HDFException
 o Vattrinfo
 public native boolean Vattrinfo(int id,
                                 int index,
                                 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[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
 o Vfindattr
 public native int Vfindattr(int id,
                             String name) throws HDFException
 o Vgetattr
 public native 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

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

Returns:
data = the value of the attribute, in an array of bytes
 o Vgetattr
 public boolean Vgetattr(int id,
                         int index,
                         Object theData) throws HDFException
Parameters:
vdata_id - IN: the Vdata id
index - IN: the index of the attribute
theData - OUT: Object, a Java array of appropriate type, dimensions, and size.

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

Returns:
data = the value of the attribute, in an array of Java objects
 o Vgetversion
 public native int Vgetversion(int id) throws HDFException
 o Vnattrs
 public native int Vnattrs(int id) throws HDFException
 o Vsetattr
 public native boolean Vsetattr(int id,
                                String attr_name,
                                int data_type,
                                int count,
                                String values) throws HDFException
 o Vsetattr
 public native boolean Vsetattr(int id,
                                String attr_name,
                                int data_type,
                                int count,
                                byte values[]) 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

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

 o Vsetattr
 public boolean Vsetattr(int id,
                         String attr_name,
                         int data_type,
                         int count,
                         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.

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

 o VSattrinfo
 public native boolean VSattrinfo(int id,
                                  int index,
                                  String name[],
                                  int argv[]) throws HDFException
Parameters:
id - IN: the Vdata id
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
 o VSfindex
 public native int VSfindex(int id,
                            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
 o VSfindattr
 public native int VSfindattr(int id,
                              int index,
                              String name) throws HDFException
 o VSfnattrs
 public native int VSfnattrs(int id,
                             int fnattrs) throws HDFException
 o VSgetattr
 public native 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

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

Returns:
data = the value of the attribute, in an array of bytes
 o VSgetattr
 public boolean VSgetattr(int id,
                          int index,
                          int attr_index,
                          Object theData) throws HDFException
Parameters:
vdata_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.

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

Returns:
data = the value of the attribute, in an array of Java objects
 o VSisattr
 public native boolean VSisattr(int id) throws HDFException
 o VSnattrs
 public native int VSnattrs(int id) throws HDFException
 o VSsetattr
 public native boolean VSsetattr(int id,
                                 int index,
                                 String attr_name,
                                 int data_type,
                                 int count,
                                 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
value - IN: Strin, the data in an String

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

 o VSsetattr
 public native boolean VSsetattr(int id,
                                 int index,
                                 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

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

 o VSsetattr
 public boolean VSsetattr(int id,
                          int index,
                          String attr_name,
                          int data_type,
                          int count,
                          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.

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

 o DF24getdims
 public native boolean DF24getdims(String fileName,
                                   int argv[]) throws HDFException
 o DF24reqil
 public native boolean DF24reqil(int il) throws HDFException
 o DF24getimage
 public native boolean DF24getimage(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

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

Returns:
data = the image in an array of bytes
 o DF24getimage
 public boolean DF24getimage(String fileName,
                             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

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

Returns:
data = the value of the attribute, in an array of Java objects
 o DF24lastref
 public native short DF24lastref() throws HDFException
 o DF24restart
 public native boolean DF24restart() throws HDFException
 o DF24readref
 public native boolean DF24readref(String filename,
                                   int ref) throws HDFException
 o DF24nimages
 public native int DF24nimages(String fileName) throws HDFException
 o DF24addimage
 public native boolean DF24addimage(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

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

 o DF24addimage
 public boolean DF24addimage(String filename,
                             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

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

 o DF24putimage
 public native boolean DF24putimage(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

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

 o DF24putimage
 public boolean DF24putimage(String filename,
                             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

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

 o DF24setcompress
 public native boolean DF24setcompress(int type,
                                       HDFCompInfo cinfo) throws HDFException
Parameters:
type - IN: int, the type of compression
cinfo - IN: HDFCompInfo, the compression parameters
 o DF24setdims
 public native boolean DF24setdims(int width,
                                   int height) throws HDFException
 o DF24setil
 public native boolean DF24setil(int il) throws HDFException
 o DFR8getdims
 public native boolean DFR8getdims(String fileName,
                                   int argv[],
                                   boolean haspalette[]) throws HDFException
 o DFR8getimage
 public native boolean DFR8getimage(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

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

Returns:
data = imagedata: the image in an array of bytes, palette: the look up table, in an array of bytes
 o DFR8getimage
 public boolean DFR8getimage(String fileName,
                             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

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

Returns:
data = theImagedata: the value of the attribute, in an array of Java objects palette: the look up table, in an array of bytes
 o DFR8lastref
 public native short DFR8lastref() throws HDFException
 o DFR8restart
 public native boolean DFR8restart() throws HDFException
 o DFR8readref
 public native boolean DFR8readref(String filename,
                                   int ref) throws HDFException
 o DFR8nimages
 public native int DFR8nimages(String fileName) throws HDFException
 o DFR8addimage
 public native boolean DFR8addimage(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

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

 o DFR8addimage
 public boolean DFR8addimage(String filename,
                             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

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

 o DFR8putimage
 public native boolean DFR8putimage(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

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

 o DFR8putimage
 public boolean DFR8putimage(String filename,
                             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

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

 o DFR8setcompress
 public native boolean DFR8setcompress(int type,
                                       HDFCompInfo cinfo) throws HDFException
Parameters:
type - IN: int, the type of compression
cinfo - IN: HDFCompInfo, the compression parameters
 o DFR8getpalref
 public native 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
 o DFR8setpalette
 public native boolean DFR8setpalette(byte palette[]) throws HDFException
 o DFR8writeref
 public native boolean DFR8writeref(String filename,
                                    short ref) throws HDFException

All Packages  Class Hierarchy  This Package  Previous  Next  Index