public class Grib2JpegDecoder extends Object
First the decoder should be initialized with a ParameterList object given through the constructor. The when the run() method is invoked and the decoder executes. The exit code of the class can be obtained with the getExitCode() method, after the constructor and after the run method. A non-zero value indicates that an error has ocurred.
The decoding chain corresponds to the following sequence of modules:
The 2 last modules cannot be used at the same time and corresponds respectively to the writing of decoded image into a file or the graphical display of this same image.
The behaviour of each module may be modified according to the current tile-component. All the specifications are kept in modules extending ModuleSpec and accessible through an instance of DecoderSpecs class.
| Modifier and Type | Field and Description |
|---|---|
int[] |
data
the decoded image data
|
| Constructor and Description |
|---|
Grib2JpegDecoder(String[] argv)
Instantiates a decoder object, width the 'argv' command
line arguments.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] buf)
Runs the decoder.
|
void |
exit()
Exit the decoding process according to the isChildProcess variable
|
static String[][] |
getAllParameters()
Returns all the parameters used in the decoding chain.
|
String[] |
getCOMInfo()
Return the information found in the COM marker segments encountered in
the decoded codestream.
|
int |
getExitCode()
Returns the exit code of the class.
|
int[] |
getGdata()
Return the decoded image as byte array
|
int |
getPackBytes()
Return the packBytes ie number bytes / number 1,2 or 4
|
static String[][] |
getParameterInfo()
Returns the parameters that are used in this class.
|
boolean |
hasSignedProblem() |
void |
setChildProcess(boolean b)
Set isChildProcess variable.
|
public Grib2JpegDecoder(String[] argv)
IllegalArgumentException - If 'argv' is emptygetExitCode()public int getExitCode()
public static String[][] getParameterInfo()
public boolean hasSignedProblem()
public void decode(byte[] buf)
getExitCode()public int getPackBytes()
public int[] getGdata()
public String[] getCOMInfo()
public static String[][] getAllParameters()
getParameterInfo()public void exit()
public void setChildProcess(boolean b)
b - The boolean valueCopyright © 1999–2013 UCAR/Unidata. All rights reserved.