public abstract class DocumentedStreamStarTableWriter extends Object implements StarTableWriter, DocumentedIOHandler
Modifier | Constructor and Description |
---|---|
protected |
DocumentedStreamStarTableWriter(String[] extensions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getExtensions()
Returns the list of filename extensions recognised by this handler.
|
boolean |
looksLikeFile(String filename)
Indicates whether the destination is of a familiar form for this
kind of writer.
|
void |
writeStarTable(StarTable table,
String location,
StarTableOutput sto)
Writes a
StarTable object to a given location. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormatName, getMimeType, writeStarTable
docIncludesExample, matchesExtension, readText, toLink
getXmlDescription
protected DocumentedStreamStarTableWriter(String[] extensions)
extensions
- list of lower-cased filename extensions,
excluding the '.' characterpublic String[] getExtensions()
DocumentedIOHandler
getExtensions
in interface DocumentedIOHandler
public boolean looksLikeFile(String filename)
StarTableWriter
true
for values of location
which look like
the normal form for their output format, for instance one with
the usual file extension.looksLikeFile
in interface StarTableWriter
filename
- the location name (probably filename)true
iff it looks like a file this writer would
normally writepublic void writeStarTable(StarTable table, String location, StarTableOutput sto) throws IOException
StarTableWriter
StarTable
object to a given location.
Implementations are free to interpret the location
argument
in any way appropriate for them. Typically however the location
will simply be used to get an output stream (for instance interpreting
it as a filename). In this case the sto
argument should
normally be used to turn location
into a stream.
StreamStarTableWriter
provides a suitable implementation
for this case.writeStarTable
in interface StarTableWriter
table
- table to writelocation
- destination for startab
sto
- StarTableOutput which dispatched this requestTableFormatException
- if startab
cannot be
written to location
IOException
- if there is some I/O errorCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.