Public Member Functions | |
Product (String filename) throws CodaException | |
Product (String filename, String product_class, String product_type, int version) throws CodaException | |
Product (String filename, String product_class, String product_type) throws CodaException | |
void | close () throws CodaException |
String | getFilename () throws CodaException |
long | getFileSize () throws CodaException |
FormatEnum | getFormat () throws CodaException |
String | getProductClass () throws CodaException |
String | getType () throws CodaException |
int | getVersion () throws CodaException |
Type | getRootType () throws CodaException |
long | getVariableValue (String variable, int index) throws CodaException |
CODA Product class.
The CODA Product class contains methods to open, close and retrieve information about product files that are supported by CODA.
Product | ( | String | filename | ) | throws CodaException |
Construct an instance of a Product class representing a product file opened for reading.
In Java, this constructor is the equivalent of the coda_open() function in the C interface.
filename | Relative or full path to the product file. |
CodaException | If an error occurred. |
Product | ( | String | filename, |
String | product_class, | ||
String | product_type, | ||
int | version ) throws CodaException |
Construct an instance of a Product class representing a product file opened for reading, forcing the use of a specific version of a format definition.
In Java, this constructor is the equivalent of the coda_open_as() function in the C interface.
filename | Relative or full path to the product file. |
product_class | Name of the product class for the requested format definition. |
product_type | Name of the product type for the requested format definition. |
version | Format version number of the product type definition. Use -1 to request the latest available definition. |
CodaException | If an error occurred. |
Product | ( | String | filename, |
String | product_class, | ||
String | product_type ) throws CodaException |
Construct an instance of a Product class representing a product file opened for reading, forcing the use of the latest version of a specific format definition.
In Java, this constructor is the equivalent of the coda_open_as() function in the C interface.
filename | Relative or full path to the product file. |
product_class | Name of the product class for the requested format definition. |
product_type | Name of the product type for the requested format definition. |
CodaException | If an error occurred. |
void close | ( | ) | throws CodaException |
Closes the open product file.
After calling this method the Product instance is no longer valid as the underlying file handle will have been released.
CodaException | If an error occurred. |
String getFilename | ( | ) | throws CodaException |
Get the filename of a product file.
CodaException | If an error occurred. |
long getFileSize | ( | ) | throws CodaException |
Get the actual file size of a product file.
CodaException | If an error occurred. |
FormatEnum getFormat | ( | ) | throws CodaException |
Get the basic file format of the product.
CodaException | If an error occurred. |
String getProductClass | ( | ) | throws CodaException |
Get the product class of a product file.
CodaException | If an error occurred. |
Type getRootType | ( | ) | throws CodaException |
Get the CODA type of the root of the product.
CodaException | If an error occurred. |
String getType | ( | ) | throws CodaException |
Get the product type of a product file.
CodaException | If an error occurred. |
long getVariableValue | ( | String | variable, |
int | index ) throws CodaException |
Get the value for a product variable.
variable | The name of the product variable. |
index | The array index of the product variable (pass 0 if the variable is a scalar). |
CodaException | If an error occurred. |
int getVersion | ( | ) | throws CodaException |
Get the product type version of a product file.
CodaException | If an error occurred. |