Package nom.tam.fits
Class RandomGroupsData
- java.lang.Object
-
- nom.tam.fits.Data
-
- nom.tam.fits.RandomGroupsData
-
- All Implemented Interfaces:
FitsElement
public class RandomGroupsData extends Data
This class instantiates FITS Random Groups data. Random groups are instantiated as a two-dimensional array of objects. The first dimension of the array is the number of groups. The second dimension is 2. The first object in every row is a one dimensional parameter array. The second element is the n-dimensional data array.
-
-
Field Summary
-
Fields inherited from class nom.tam.fits.Data
dataSize, fileOffset, input
-
-
Constructor Summary
Constructors Constructor Description RandomGroupsData()
Create the equivalent of a null data element.RandomGroupsData(java.lang.Object[][] x)
Create a RandomGroupsData object using the specified object to initialize the data array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fillHeader(Header h)
java.lang.Object
getData()
protected long
getTrueSize()
Get the size of the actual data element.void
read(ArrayDataInput str)
Read the RandomGroupsDatavoid
write(ArrayDataOutput str)
Write the RandomGroupsData-
Methods inherited from class nom.tam.fits.Data
getFileOffset, getKernel, getSize, reset, rewrite, rewriteable, setFileOffset
-
-
-
-
Constructor Detail
-
RandomGroupsData
public RandomGroupsData()
Create the equivalent of a null data element.
-
RandomGroupsData
public RandomGroupsData(java.lang.Object[][] x)
Create a RandomGroupsData object using the specified object to initialize the data array.- Parameters:
x
- The initial data array. This should a two-d array of objects as described above.
-
-
Method Detail
-
fillHeader
protected void fillHeader(Header h) throws FitsException
- Throws:
FitsException
-
getData
public java.lang.Object getData()
-
getTrueSize
protected long getTrueSize()
Get the size of the actual data element.
-
read
public void read(ArrayDataInput str) throws FitsException
Read the RandomGroupsData- Specified by:
read
in interfaceFitsElement
- Specified by:
read
in classData
- Parameters:
str
- The input data stream- Throws:
FitsException
- if the read was unsuccessful.
-
write
public void write(ArrayDataOutput str) throws FitsException
Write the RandomGroupsData- Specified by:
write
in interfaceFitsElement
- Specified by:
write
in classData
- Parameters:
str
- The output stream on which to write the data.- Throws:
FitsException
- if the write was unsuccessful.
-
-