uk.ac.starlink.mirage

## Class MirageFormatter

- java.lang.Object
- - uk.ac.starlink.mirage.MirageFormatter

-     public class MirageFormatter
      extends java.lang.Object

  Turns StarTables into Mirage format tables.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.io.PrintStream` | `strm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MirageFormatter(java.io.PrintStream strm)` Constructs a new formatter which will write to a given stream.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)` Writes a table to standard output in Mirage format.
    `java.lang.String` | `toString()`
    `void` | `writeMirageFormat(StarTable table)` Writes a StarTable to a stream in Mirage format.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### strm

          protected java.io.PrintStream strm

  - ### Constructor Detail

    - #### MirageFormatter

          public MirageFormatter(java.io.PrintStream strm)

      Constructs a new formatter which will write to a given stream.
      Parameters:
        `strm` - the stream into which mirage format tables will be written

  - ### Method Detail

    - #### writeMirageFormat

          public void writeMirageFormat(StarTable table)
                                 throws java.io.IOException

      Writes a StarTable to a stream in Mirage format.
      Parameters:
        `table` - a StarTable object to write
      Throws:
        `java.io.IOException` - if there is a write error

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException

      Writes a table to standard output in Mirage format.
      Parameters:
        `args` - a 1-element array giving the location of the table to print
      Throws:
        `java.io.IOException`