Package nom.tam.fits
Class UndefinedData
- java.lang.Object
-
- nom.tam.fits.Data
-
- nom.tam.fits.UndefinedData
-
- All Implemented Interfaces:
FitsElement
public class UndefinedData extends Data
This class provides a simple holder for data which is not handled by other classes.
-
-
Field Summary
Fields Modifier and Type Field Description private static intBITS_PER_BYTEprivate byte[]dataprivate static java.util.logging.LoggerLOG-
Fields inherited from class nom.tam.fits.Data
dataSize, fileOffset, input
-
-
Constructor Summary
Constructors Constructor Description UndefinedData(java.lang.Object x)Create an UndefinedData object using the specified object.UndefinedData(Header h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfillHeader(Header head)Fill header with keywords that describe data.java.lang.ObjectgetData()protected longgetTrueSize()Get the size in bytes of the datavoidread(ArrayDataInput i)Read a data array into the current object and if needed position to the beginning of the next FITS block.voidwrite(ArrayDataOutput o)Write the data -- including any buffering needed-
Methods inherited from class nom.tam.fits.Data
getFileOffset, getKernel, getSize, reset, rewrite, rewriteable, setFileOffset
-
-
-
-
Field Detail
-
LOG
private static final java.util.logging.Logger LOG
-
BITS_PER_BYTE
private static final int BITS_PER_BYTE
- See Also:
- Constant Field Values
-
data
private byte[] data
-
-
Constructor Detail
-
UndefinedData
public UndefinedData(Header h) throws FitsException
- Throws:
FitsException
-
UndefinedData
public UndefinedData(java.lang.Object x)
Create an UndefinedData object using the specified object.- Parameters:
x- object to create the hdu from
-
-
Method Detail
-
fillHeader
protected void fillHeader(Header head)
Fill header with keywords that describe data.- Specified by:
fillHeaderin classData- Parameters:
head- The FITS header
-
getData
public java.lang.Object getData()
-
getTrueSize
protected long getTrueSize()
Get the size in bytes of the data- Specified by:
getTrueSizein classData
-
read
public void read(ArrayDataInput i) throws FitsException
Description copied from interface:FitsElementRead a data array into the current object and if needed position to the beginning of the next FITS block.- Specified by:
readin interfaceFitsElement- Specified by:
readin classData- Parameters:
i- The input data stream- Throws:
FitsException- if the read was unsuccessful.
-
write
public void write(ArrayDataOutput o) throws FitsException
Description copied from class:DataWrite the data -- including any buffering needed- Specified by:
writein interfaceFitsElement- Specified by:
writein classData- Parameters:
o- The output stream on which to write the data.- Throws:
FitsException- if the write was unsuccessful.
-
-