public interface OutputFormat
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.
|
java.lang.String getMimeType()
java.lang.String getShortMimeType()
java.lang.String getDescription()
java.lang.String getFileExtension()
void writeResult(TableIterator result, java.io.OutputStream output, TAPExecutionReport execReport, java.lang.Thread thread) throws TAPException, java.io.IOException, java.lang.InterruptedException
Formats 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.
result
- 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.