|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.StreamStarTableWriter
uk.ac.starlink.fits.AbstractFitsTableWriter
public abstract class AbstractFitsTableWriter
Abstract table writer superclass designed for writing FITS tables.
A couple of Auxiliary metadata items of the ColumnInfo metadata from written tables are respected:
Tables.NULL_VALUE_INFO
:
sets the value of TNULLn
"magic" blank value for
integer columnsTables.UBYTE_FLAG_INFO
:
if set to Boolean.TRUE
and if the column has content class
Short
or short[]
, the data will be written
as unsigned bytes (TFORMn='B'
)
not 16-bit signed integers (TFORMn='I'
).
Constructor Summary | |
---|---|
protected |
AbstractFitsTableWriter(String formatName)
Constructor. |
Method Summary | |
---|---|
protected void |
addMetadata(nom.tam.fits.Header hdr)
Adds some standard metadata header cards to a FITS table header. |
protected abstract FitsTableSerializer |
createSerializer(StarTable table)
Provides a suitable serializer for a given table. |
static String |
getCurrentDate()
Returns an ISO-8601 data string representing the time at which this method is called. |
String |
getFormatName()
Gives the name of the format which is written by this writer. |
String |
getMimeType()
Returns "application/fits". |
void |
setFormatName(String formatName)
Sets the declared format name. |
void |
writePrimaryHDU(DataOutput out)
Writes the primary HDU. |
void |
writeStarTable(StarTable table,
OutputStream out)
Writes a single table. |
void |
writeStarTables(TableSequence tableSeq,
OutputStream out)
Writes tables. |
void |
writeStarTables(TableSequence tableSeq,
String location,
StarTableOutput sto)
Invokes writeStarTables(uk.ac.starlink.table.TableSequence,
java.io.OutputStream) . |
void |
writeTableHDU(StarTable table,
FitsTableSerializer fitser,
DataOutput out)
Writes a data HDU. |
Methods inherited from class uk.ac.starlink.table.StreamStarTableWriter |
---|
writeStarTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.starlink.table.StarTableWriter |
---|
looksLikeFile, writeStarTable |
Constructor Detail |
---|
protected AbstractFitsTableWriter(String formatName)
formatName
- format nameMethod Detail |
---|
public String getFormatName()
StarTableWriter
getFormatName
in interface StarTableWriter
public void setFormatName(String formatName)
formatName
- format namepublic String getMimeType()
getMimeType
in interface StarTableWriter
public void writeStarTable(StarTable table, OutputStream out) throws IOException
writeStarTables(uk.ac.starlink.table.TableSequence, java.io.OutputStream)
.
writeStarTable
in interface StarTableWriter
table
- the table to writeout
- the output stream to which startab should be
written
TableFormatException
- if this table cannot be written to a
stream
IOException
- if there is some I/O errorpublic void writeStarTables(TableSequence tableSeq, OutputStream out) throws IOException
writePrimaryHDU(java.io.DataOutput)
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
tableSeq
- sequence of tables to writeout
- destination stream
IOException
public void writeStarTables(TableSequence tableSeq, String location, StarTableOutput sto) throws IOException
writeStarTables(uk.ac.starlink.table.TableSequence,
java.io.OutputStream)
.
writeStarTables
in interface MultiStarTableWriter
tableSeq
- sequence of tables to writelocation
- destination for tablessto
- StarTableOutput instance
IOException
public void writePrimaryHDU(DataOutput out) throws IOException
out
- destination stream
IOException
public void writeTableHDU(StarTable table, FitsTableSerializer fitser, DataOutput out) throws IOException
table
- the table to be written into the HDUfitser
- fits serializer initalised from table
out
- destination stream
IOException
protected abstract FitsTableSerializer createSerializer(StarTable table) throws IOException
table
- table to serialize
IOException
protected void addMetadata(nom.tam.fits.Header hdr)
hdr
- header to modifypublic static String getCurrentDate()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |