|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.StreamStarTableWriter | +--uk.ac.starlink.fits.AbstractFitsTableWriter
Abstract table writer superclass designed for writing FITS tables.
Constructor Summary | |
protected |
AbstractFitsTableWriter(String formatName)
Constructor. |
Method Summary | |
protected void |
addMetadata(Header hdr)
Adds some standard metadata header cards to a FITS 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. |
abstract void |
writePrimaryHDU(StarTable table,
FitsTableSerializer fitser,
DataOutput out)
Writes the primary HDU. |
void |
writeStarTable(StarTable table,
OutputStream out)
Writes a StarTable object to a given output stream. |
void |
writeTableHDU(StarTable table,
FitsTableSerializer fitser,
DataOutput out)
Writes the 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 |
Constructor Detail |
protected AbstractFitsTableWriter(String formatName)
formatName
- format nameMethod Detail |
public String getFormatName()
StarTableWriter
public void setFormatName(String formatName)
formatName
- format namepublic String getMimeType()
public void writeStarTable(StarTable table, OutputStream out) throws IOException
StarTableWriter
BufferedOutputStream
), and should not close it
at the end of the call.
Not all table writers are capable of writing to a stream;
an implementation may throw a TableFormatException
to
indicate that it cannot do so.
table
- the table to writeout
- the output stream to which startab should be
written
IOException
- if there is some I/O errorpublic abstract void writePrimaryHDU(StarTable table, FitsTableSerializer fitser, DataOutput out) throws IOException
table
- the table which will be written into the next HDUfitser
- fits serializer initialised from table
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(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 |