uk.ac.starlink.mirage
Class MirageTableWriter

java.lang.Object
  |
  +--uk.ac.starlink.mirage.MirageTableWriter
All Implemented Interfaces:
StarTableWriter

public class MirageTableWriter
extends Object
implements StarTableWriter


Constructor Summary
MirageTableWriter()
           
 
Method Summary
 String getFormatName()
          Gives the name of the format which is written by this writer.
 boolean looksLikeFile(String filename)
          Indicates whether the destination is of a familiar form for this kind of writer.
 void writeStarTable(StarTable startab, String location)
          Writes a StarTable object to a given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MirageTableWriter

public MirageTableWriter()
Method Detail

writeStarTable

public void writeStarTable(StarTable startab,
                           String location)
                    throws IOException
Description copied from interface: StarTableWriter
Writes a StarTable object to a given location. If possible, a location of "-" should be taken as a request to write to standard output.

Specified by:
writeStarTable in interface StarTableWriter
Parameters:
startab - the table to write
location - the destination of the written object (probably, but not necessarily, a filename)
IOException

looksLikeFile

public boolean looksLikeFile(String filename)
Description copied from interface: StarTableWriter
Indicates whether the destination is of a familiar form for this kind of writer. This may be used to guess what kind of format a table should be written in. Implementations should return true for values of location which look like the normal form for their output format, for instance one with the usual file extension.

Specified by:
looksLikeFile in interface StarTableWriter
Parameters:
filename - the location name (probably filename)
Returns:
true iff it looks like a file this writer would normally write

getFormatName

public String getFormatName()
Description copied from interface: StarTableWriter
Gives the name of the format which is written by this writer. Matching against this string may be used by callers to identify or select this writer from a list.

Specified by:
getFormatName in interface StarTableWriter

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.