|
|||||||||
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.
Constructor Summary | |
---|---|
protected |
AbstractFitsTableWriter(java.lang.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 java.lang.String |
getCurrentDate()
Returns an ISO-8601 data string representing the time at which this method is called. |
java.lang.String |
getFormatName()
Gives the name of the format which is written by this writer. |
java.lang.String |
getMimeType()
Returns "application/fits". |
void |
setFormatName(java.lang.String formatName)
Sets the declared format name. |
void |
writePrimaryHDU(java.io.DataOutput out)
Writes the primary HDU. |
void |
writeStarTable(StarTable table,
java.io.OutputStream out)
Writes a single table. |
void |
writeStarTables(TableSequence tableSeq,
java.io.OutputStream out)
Writes tables. |
void |
writeStarTables(TableSequence tableSeq,
java.lang.String location,
StarTableOutput sto)
Invokes writeStarTables(uk.ac.starlink.table.TableSequence,
java.io.OutputStream) . |
void |
writeTableHDU(StarTable table,
FitsTableSerializer fitser,
java.io.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(java.lang.String formatName)
formatName
- format nameMethod Detail |
---|
public java.lang.String getFormatName()
StarTableWriter
getFormatName
in interface StarTableWriter
public void setFormatName(java.lang.String formatName)
formatName
- format namepublic java.lang.String getMimeType()
getMimeType
in interface StarTableWriter
public void writeStarTable(StarTable table, java.io.OutputStream out) throws java.io.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
java.io.IOException
- if there is some I/O errorpublic void writeStarTables(TableSequence tableSeq, java.io.OutputStream out) throws java.io.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
java.io.IOException
public void writeStarTables(TableSequence tableSeq, java.lang.String location, StarTableOutput sto) throws java.io.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
java.io.IOException
public void writePrimaryHDU(java.io.DataOutput out) throws java.io.IOException
out
- destination stream
java.io.IOException
public void writeTableHDU(StarTable table, FitsTableSerializer fitser, java.io.DataOutput out) throws java.io.IOException
table
- the table to be written into the HDUfitser
- fits serializer initalised from table
out
- destination stream
java.io.IOException
protected abstract FitsTableSerializer createSerializer(StarTable table) throws java.io.IOException
table
- table to serialize
java.io.IOException
protected void addMetadata(nom.tam.fits.Header hdr)
hdr
- header to modifypublic static java.lang.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 |