public class FITSFormat extends java.lang.Object implements OutputFormat
| Modifier and Type | Field and Description |
|---|---|
protected ServiceConnection |
service
The
ServiceConnection to use (for the log and to have some information about the service (particularly: name, description). |
| Constructor and Description |
|---|
FITSFormat(ServiceConnection service)
Creates a FITS formatter.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Gets a description of this format.
|
java.lang.String |
getFileExtension()
Gets a file extension for this format.
|
java.lang.String |
getMimeType()
Gets the MIME type corresponding to this format.
|
java.lang.String |
getShortMimeType()
Gets a short expression of its MIME type.
|
void |
writeResult(TableIterator result,
java.io.OutputStream output,
TAPExecutionReport execReport,
java.lang.Thread thread)
Formats the given query result and writes it in the given output stream.
|
protected final ServiceConnection service
ServiceConnection to use (for the log and to have some information about the service (particularly: name, description).public FITSFormat(ServiceConnection service) throws java.lang.NullPointerException
service - The service to use (for the log and to have some information about the service (particularly: name, description).java.lang.NullPointerException - If the given service connection is null.public java.lang.String getMimeType()
OutputFormatgetMimeType in interface OutputFormatpublic java.lang.String getShortMimeType()
OutputFormatgetShortMimeType in interface OutputFormatpublic java.lang.String getDescription()
OutputFormatgetDescription in interface OutputFormatpublic java.lang.String getFileExtension()
OutputFormatgetFileExtension in interface OutputFormatpublic void writeResult(TableIterator result, java.io.OutputStream output, TAPExecutionReport execReport, java.lang.Thread thread) throws TAPException, java.io.IOException, java.lang.InterruptedException
OutputFormatFormats the given query result and writes it in the given output stream.
Note: the given output stream should not be closed at the end of this function. It is up to the called to do it.
writeResult in interface OutputFormatresult - The raw (table) result to format.output - The output stream (a ServletOutputStream or a stream on a file) in which the formatted result must be written.execReport - The report of the execution of the TAP query whose the result must be now written.thread - The thread which has asked the result writing.TAPException - If there is an error while formatting the query result.java.io.IOException - If any error occurs while writing into the given stream.java.lang.InterruptedException - If the query has been interrupted/aborted.