Class RandomGroupsData
java.lang.Object
nom.tam.fits.Data
nom.tam.fits.RandomGroupsData
- All Implemented Interfaces:
FitsElement
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
FieldsFields inherited from class Data
dataSize, fileOffset, input -
Constructor Summary
ConstructorsConstructorDescriptionCreate the equivalent of a null data element.RandomGroupsData(Object[][] x) Create a RandomGroupsData object using the specified object to initialize the data array. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfillHeader(Header h) Modify a header to point to this data, this differs per subclass, they all need oder provided different informations to the header.getData()protected longGet the size of the actual data element.voidread(ArrayDataInput str) Read the RandomGroupsDatavoidwrite(ArrayDataOutput str) Write the RandomGroupsDataMethods inherited from class Data
getFileOffset, getKernel, getSize, reset, rewrite, rewriteable, setFileOffset
-
Field Details
-
dataArray
-
-
Constructor Details
-
RandomGroupsData
public RandomGroupsData()Create the equivalent of a null data element. -
RandomGroupsData
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 Details
-
fillHeader
Description copied from class:DataModify a header to point to this data, this differs per subclass, they all need oder provided different informations to the header. Basically they describe the structure of this data object.- Specified by:
fillHeaderin classData- Parameters:
h- header to fill with the data from the current data object- Throws:
FitsException- if the operation fails
-
getData
-
getTrueSize
protected long getTrueSize()Get the size of the actual data element.- Specified by:
getTrueSizein classData
-
read
Read the RandomGroupsData- Specified by:
readin interfaceFitsElement- Specified by:
readin classData- Parameters:
str- The input data stream- Throws:
FitsException- if the read was unsuccessful.
-
write
Write the RandomGroupsData- Specified by:
writein interfaceFitsElement- Specified by:
writein classData- Parameters:
str- The output stream on which to write the data.- Throws:
FitsException- if the write was unsuccessful.
-