All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.hdf.io.HDFWriter

java.lang.Object
   |
   +----ncsa.hdf.io.HDFWriter

public class HDFWriter
extends Object
HDFWriter writes HDF Objects into an HDF file

Version:
1.1.3 December 11 1997
Author:
Peter X. Cao
See Also:
Writer

Constructor Index

 o HDFWriter(String)
creates a HDFWriter with specific filename

Method Index

 o createHDF()
creates a new HDF file
 o createRainbowPalette()
Return the RAINBOW palette rgb rgb rgb rgb rgb ....
 o writeAnnotation(String, int)
write file description
 o writeGR(int, String, int, int, int, int[], int[], int[], int, Object, byte[])
write GR image data
 o writeSDS(int, String, int, int, int[], int[], int[], Object)
write SDS data
 o writeVdata(int, String, int, int, String, int, Object, int)
Writes a single data record to the specified vdata
 o writeVdata(int, String, int, int[], String[], int[], Object, int, int)
Writes all data records to the specified vdata

Constructors

 o HDFWriter
 public HDFWriter(String filename)
creates a HDFWriter with specific filename

Methods

 o createHDF
 public boolean createHDF() throws HDFException
creates a new HDF file

Throws: HDFException
thrown when the file cannot be openned
 o writeAnnotation
 public boolean writeAnnotation(String annotation,
                                int access) throws HDFException
write file description

Returns:
true if the access to the HDF file is secceded
Throws: HDFException
thrown when file cannot be written
 o writeGR
 public boolean writeGR(int access,
                        String name,
                        int ncomp,
                        int type,
                        int interlace,
                        int dimension[],
                        int start[],
                        int stride[],
                        int index,
                        Object data,
                        byte palette[]) throws HDFException
write GR image data

Returns:
true if the access to the HDF file is succeded
Throws: HDFException
thrown when file cannot be written
 o writeSDS
 public boolean writeSDS(int access,
                         String name,
                         int rank,
                         int type,
                         int dimension[],
                         int start[],
                         int stride[],
                         Object data) throws HDFException
write SDS data

Returns:
true if the access to the HDF file is succeded
Throws: HDFException
thrown when file cannot be written
 o writeVdata
 public boolean writeVdata(int access,
                           String name,
                           int ref,
                           int type,
                           String fieldName,
                           int fieldOrder,
                           Object data,
                           int n_records) throws HDFException
Writes a single data record to the specified vdata

Returns:
true if the access to the HDF file is succeded
Throws: HDFException
thrown when file cannot be written
 o writeVdata
 public boolean writeVdata(int access,
                           String name,
                           int ref,
                           int types[],
                           String fieldNames[],
                           int fieldOrders[],
                           Object data,
                           int n_records,
                           int interlace) throws HDFException
Writes all data records to the specified vdata

Returns:
true if the access to the HDF file is succeded
Throws: HDFException
thrown when file cannot be written
 o createRainbowPalette
 public static byte[] createRainbowPalette()
Return the RAINBOW palette rgb rgb rgb rgb rgb ....


All Packages  Class Hierarchy  This Package  Previous  Next  Index