public class FitsTableWriter extends AbstractFitsTableWriter
contentClass
is in the following list:
Output is currently to fixed-width columns only. For StarTable columns of variable size, a first pass is made through the table data to determine the largest size they assume, and the size in the output table is set to the largest of these. Excess space is padded with some sort of blank value (NaN for floating point values, spaces for strings, zero-like values otherwise).
Modifier and Type | Class and Description |
---|---|
static class |
FitsTableWriter.PrimaryType
Characterises the type of Primary HDU that will precede table
extensions written by this writer.
|
static class |
FitsTableWriter.VarArrayMode
Enumeration for variable-length array value storage options.
|
Constructor and Description |
---|
FitsTableWriter()
Default constructor.
|
FitsTableWriter(String name,
boolean allowSignedByte,
WideFits wide)
Deprecated.
allows some configuration options but not others;
use no-arg constructor and configuration methods instead
|
Modifier and Type | Method and Description |
---|---|
FitsTableSerializer |
createSerializer(StarTable table)
Provides a suitable serializer for a given table.
|
boolean |
getAllowSignedByte()
Returns a flag indicating how Byte-valued columns are written.
|
FitsTableWriter.PrimaryType |
getPrimaryType()
Returns the type of Primary HDU that will precede the extension HDU(s)
corresponding to the table(s) being written.
|
StoragePolicy |
getStoragePolicy()
Returns the storage policy that will be used if required.
|
FitsTableWriter.VarArrayMode |
getVarArray()
Indicates how variable-length array valued columns will be stored.
|
boolean |
isColfits()
Returns whether table data will be written in column-oriented form.
|
boolean |
looksLikeFile(String location)
Returns true if
location ends with something like ".fit"
or ".fits" or ".fts". |
void |
setColfits(boolean colfits)
Sets whether table data should be written in column-oriented form.
|
void |
setPrimaryType(FitsTableWriter.PrimaryType primaryType)
Sets the type of Primary HDU that will precede the extension HDU(s)
corresponding to the table(s) being written.
|
void |
setStoragePolicy(StoragePolicy storage)
Sets the storage policy to use where required.
|
void |
setVarArray(FitsTableWriter.VarArrayMode varArray)
Configures how variable-length array values will be stored.
|
void |
writeStarTables(TableSequence tableSeq,
OutputStream out)
Writes tables.
|
getAllowZeroLengthString, getConfig, getCurrentDate, getFormatName, getMetadataCards, getMimeType, getPadCharacter, getWide, getWriteDate, setAllowSignedByte, setAllowZeroLengthString, setFormatName, setPadCharacter, setWide, setWriteDate, writePrimaryHDU, writeStarTable, writeStarTables, writeTableHDU
writeStarTable, writeStarTable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeStarTable
public FitsTableWriter()
@Deprecated public FitsTableWriter(String name, boolean allowSignedByte, WideFits wide)
public boolean looksLikeFile(String location)
location
ends with something like ".fit"
or ".fits" or ".fts".location
- filenamepublic void setPrimaryType(FitsTableWriter.PrimaryType primaryType)
primaryType
- type of primary HDUpublic FitsTableWriter.PrimaryType getPrimaryType()
public void setColfits(boolean colfits)
nrow
elements.colfits
- true for column-oriented, false for row-orientedpublic boolean isColfits()
public void setVarArray(FitsTableWriter.VarArrayMode varArray)
varArray
- variable-length array storage modepublic FitsTableWriter.VarArrayMode getVarArray()
public void setStoragePolicy(StoragePolicy storage)
storage
- storage policy to use when writing colfitspublic StoragePolicy getStoragePolicy()
public boolean getAllowSignedByte()
AbstractFitsTableWriter
getAllowSignedByte
in class AbstractFitsTableWriter
public FitsTableSerializer createSerializer(StarTable table) throws IOException
AbstractFitsTableWriter
createSerializer
in class AbstractFitsTableWriter
table
- table to serializeIOException
- if the table can't be writtenpublic void writeStarTables(TableSequence tableSeq, OutputStream out) throws IOException
AbstractFitsTableWriter
AbstractFitsTableWriter.writePrimaryHDU(java.io.OutputStream)
to write the primary HDU.
Subclasses which want to put something related to the input tables
into the primary HDU will need to override this method
(writeStarTables).writeStarTables
in interface MultiStarTableWriter
writeStarTables
in class AbstractFitsTableWriter
tableSeq
- sequence of tables to writeout
- destination streamIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.