Next Previous Up Contents
Next: Extensible I/O framework
Up: Top
Previous: Adapting Sequential to Random Access

## 3 Table I/O

The table input and output facilities of STIL are handled by format-specific input and output handlers; supplied with the package are, amongst others, a VOTable input handler and output handler, and this means that STIL can read and write tables in VOTable format. An input handler is an object which can turn an external resource into a `StarTable` object, and an output handler is one which can take a `StarTable` object and store it externally in some way. These handlers are independent components of the system, and so new ones can be written, allowing all the STIL features to be used on new table formats without having to make any changes to the core classes of the library.

There are two ways of using these handlers. You can either use them directly to read in/write out a table using a particular format, or you can use the generic I/O facilities which know about several of these handlers and select an appropriate one at run time. The generic reader class is `StarTableFactory` which knows about input handlers implementing the `TableBuilder` interface, and the generic writer class is `StarTableOutput` which knows about output handlers implementing the `StarTableWriter` interface. The generic approach is more flexible in a multi-format environment (your program will work whether you point it at a VOTable, FITS file or SQL query) and is generally easier to use, but if you know what format you're going to be dealing with you may have more control over format-specific options using the handler directly.

The following sections describe in more detail the generic input and output facilities, followed by descriptions of each of the format-specific I/O handlers which are supplied with the package. There is an additional section (Section 3.10) which deals with table reading and writing using an SQL database.

- 3.1 Extensible I/O framework
- 3.2 Generic Table Resource Input
- 3.3 Generic Table Streamed Input
- 3.4 Generic Table Output
- 3.5 Specifying I/O Handlers
- 3.6 Supplied Input Handlers

- 3.6.1 FITS
- 3.6.2 Column-oriented FITS
- 3.6.3 VOTable
- 3.6.4 ECSV
- 3.6.5 Machine-Readable Table
- 3.6.6 Parquet
- 3.6.7 CDF
- 3.6.8 Feather
- 3.6.9 ASCII
- 3.6.10 Comma-Separated Values
- 3.6.11 Tab-Separated Table
- 3.6.12 IPAC
- 3.6.13 GBIN
- 3.6.14 WDC

- 3.7 Supplied Output Handlers

- 3.7.1 FITS
- 3.7.2 Column-oriented FITS
- 3.7.3 VOTable
- 3.7.4 ECSV
- 3.7.5 Parquet
- 3.7.6 Feather
- 3.7.7 ASCII
- 3.7.8 Comma-Separated Values
- 3.7.9 Tab-Separated Table
- 3.7.10 IPAC
- 3.7.11 Plain Text
- 3.7.12 HTML
- 3.7.13 LaTeX
- 3.7.14 Mirage

- 3.8 Non-Standard FITS Conventions

- 3.8.1 FITS-plus
- 3.8.2 Wide FITS

- 3.9 Table Schemes

- 3.9.1 `jdbc`
- 3.9.2 `loop`
- 3.9.3 `test`
- 3.9.4 `class`

- 3.10 I/O using SQL databases

- 3.10.1 JDBC Configuration
- 3.10.2 Reading from a Database
- 3.10.3 Writing to a Database

Next Previous Up Contents
Next: Extensible I/O framework
Up: Top
Previous: Adapting Sequential to Random Access

STIL - Starlink Tables Infrastructure Library
Starlink User Note252
STIL web page: http://www.starlink.ac.uk/stil/
Author email: m.b.taylor@bristol.ac.uk