Class VariableFitsTableSerializer
java.lang.Object
uk.ac.starlink.fits.StandardFitsTableSerializer
uk.ac.starlink.fits.VariableFitsTableSerializer
- All Implemented Interfaces:
FitsTableSerializer
FitsTableSerializer which can write variable array-valued columns
using the 'P' or 'Q' TFORM formatting characters.
- Since:
- 10 Jul 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionVariableFitsTableSerializer(FitsTableSerializerConfig config, uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.StoragePolicy storagePolicy) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns header cards suitable for the HDU which will contain the table.voidset64BitMode(boolean useQ) Sets whether this serializer should use the 'P' descriptor (32-bit addressing into the heap) or the 'Q' descriptor (64-bit addressing into the heap) for variable-length array columns.voidwriteData(DataOutput out) Writes the HDU data for the table to an output stream.Methods inherited from class StandardFitsTableSerializer
getBadValue, getConfig, getDimensions, getFormatChar, getHealpixHeaders, getRowCount, writeDataOnly
-
Constructor Details
-
VariableFitsTableSerializer
public VariableFitsTableSerializer(FitsTableSerializerConfig config, uk.ac.starlink.table.StarTable table, uk.ac.starlink.table.StoragePolicy storagePolicy) throws IOException Constructor.- Parameters:
config- FITS configurationtable- table to writestoragePolicy- policy for acquiring byte array scratch buffers- Throws:
IOException- if it won't be possible to write the given table
-
-
Method Details
-
set64BitMode
public void set64BitMode(boolean useQ) Sets whether this serializer should use the 'P' descriptor (32-bit addressing into the heap) or the 'Q' descriptor (64-bit addressing into the heap) for variable-length array columns. Normally Q is only used if the heap is larger than 2^31.- Parameters:
useQ- true for Q, false for P
-
getHeader
Description copied from interface:FitsTableSerializerReturns header cards suitable for the HDU which will contain the table. Additional metadata and an END marker will be added after these cards, so the returned array must not contain the END card.- Specified by:
getHeaderin interfaceFitsTableSerializer- Overrides:
getHeaderin classStandardFitsTableSerializer- Returns:
- header cards
-
writeData
Description copied from interface:FitsTableSerializerWrites the HDU data for the table to an output stream. This is only intended to be called once following creation of this object. Subsequent calls result in undefined behaviour.- Specified by:
writeDatain interfaceFitsTableSerializer- Overrides:
writeDatain classStandardFitsTableSerializer- Parameters:
out- destination stream- Throws:
IOException
-