|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StarTableWriter
Defines an object which can output a StarTable in a particular format.
Method Summary | |
---|---|
String |
getFormatName()
Gives the name of the format which is written by this writer. |
String |
getMimeType()
Returns a string suitable for use as the value of a MIME Content-Type header. |
boolean |
looksLikeFile(String location)
Indicates whether the destination is of a familiar form for this kind of writer. |
void |
writeStarTable(StarTable startab,
OutputStream out)
Writes a StarTable object to a given output stream. |
void |
writeStarTable(StarTable startab,
String location,
StarTableOutput sto)
Writes a StarTable object to a given location. |
Method Detail |
---|
void writeStarTable(StarTable startab, OutputStream out) throws TableFormatException, IOException
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.
startab
- the table to writeout
- the output stream to which startab should be
written
TableFormatException
- if this table cannot be written to a
stream
IOException
- if there is some I/O errorvoid writeStarTable(StarTable startab, String location, StarTableOutput sto) throws TableFormatException, IOException
StreamStarTableWriter
provides a suitable implementation
for this case.
startab
- table to writelocation
- destination for startabsto
- StarTableOutput which dispatched this request
TableFormatException
- if startab cannot be written
to location
IOException
- if there is some I/O errorboolean looksLikeFile(String location)
location
- the location name (probably filename)
String getFormatName()
String getMimeType()
application/octet-stream
"
(for binary formats) or "text/plain
" for ASCII ones)
is recommended.
|
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 |