Class NullData
java.lang.Object
nom.tam.fits.Data
nom.tam.fits.ImageData
nom.tam.fits.NullData
- All Implemented Interfaces:
FitsElement
A subclass of
Data containing no actual data. It wraps an underlying data of null.- Since:
- 1.18
- Author:
- Attila Kovacs
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidread(ArrayDataInput in) Reads the data or skips over it for reading later, depending on whether reading from a stream or a random acessible input, respectively.voidSets the buffer that may hold a serialized version of the data for this image.voidWrites the contents of the element to a data sink, adding padding as necessary if the element (such as a header or data segment) is expected to complete the FITS block of 2880 bytes.Methods inherited from class ImageData
convertTo, from, getDimensions, getQuantizer, getTiler, getType, isComplexValued, overrideHeaderAxes, setQuantizer, toHDUModifier and TypeMethodDescriptionConverts this image HDU to another image HDU of a different type, possibly using a qunatizer for the integer-decimal conversion of the data elements.static ImageDataCreates a new FITS image using the specified primitive numerical Java array containing data.final int[]Returns the dimensions of this image.final QuantizerReturns the conversion between decimal and integer data representations.getTiler()Returns the an image tiler instance that can be used to divide this image into tiles that may be processed separately (and in parallel).final Class<?> getType()Returns the element type of this image in its current representation.final booleanChecks if the image data is explicitly designated as a complex-valued image.static voidoverrideHeaderAxes(Header header, int... sizes) (for expert users) Overrides the image size description in the header to the specified Java array dimensions.voidsetQuantizer(Quantizer quant) Sets the conversion between decimal and integer data representations.toHDU()Returns an approprotae HDU object that encapsulates this FITS data, and contains the minimal mandatory header description for that data.Methods inherited from class Data
calcChecksum, detach, getData, getFileOffset, getKernel, getSize, isDeferred, isEmpty, reset, rewrite, rewriteableModifier and TypeMethodDescriptionlongComputes and returns the FITS checksum for this data, for example to compare against the storedDATASUMin the FITS header (e.g. viaBasicHDU.getStoredDatasum()).voiddetach()Detaches this data object from the input (if any), such as a file or stream, but not before loading data from the previously assigned input into memory.getData()Returns the underlying Java representation of the data contained in this HDU's data segment.longReturns the byte offset at which this element starts ina file.final ObjectSame asData.getData().longgetSize()Returns the size of this elements in the FITS representation.booleanChecks if the data should be assumed to be in deferred read mode.booleanisEmpty()Checks if the data content is currently empty, i.e. no actual data is currently stored in memory.booleanreset()Reset the input stream to point to the beginning of this elementvoidrewrite()Rewrite the contents of the element in place.booleanChecks if we can write this element back to its source.
-
Constructor Details
-
NullData
public NullData()Instantiates an empty data object for a header-only HDU.
-
-
Method Details
-
read
Description copied from class:DataReads the data or skips over it for reading later, depending on whether reading from a stream or a random acessible input, respectively.
In case the argument is a an instance of
RandomAccessinput (such as aFitsFile, the call will simply note where in the file the data segment can be found for reading at a later point, only when the data content is accessed. This 'deferred' reading behavior make it possible to process large HDUs even with small amount of RAM, and can result in a significant performance boost when inspectring large FITS files, or using only select content from large FITS files.- Specified by:
readin interfaceFitsElement- Overrides:
readin classImageData- Parameters:
in- The input data stream- See Also:
-
write
Description copied from interface:FitsElementWrites the contents of the element to a data sink, adding padding as necessary if the element (such as a header or data segment) is expected to complete the FITS block of 2880 bytes.- Specified by:
writein interfaceFitsElement- Overrides:
writein classImageData- Parameters:
o- The data sink.
-
setBuffer
-