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 PDS4
- 3.6.6 Machine-Readable Table
- 3.6.7 Parquet
- 3.6.8 HAPI
- 3.6.9 CDF
- 3.6.10 Feather
- 3.6.11 ASCII
- 3.6.12 Comma-Separated Values
- 3.6.13 Tab-Separated Table
- 3.6.14 IPAC
- 3.6.15 GBIN
- 3.6.16 WDC

- 3.7 Supplied Output Handlers

- 3.7.1 FITS
- 3.7.2 VOTable
- 3.7.3 ECSV
- 3.7.4 Parquet
- 3.7.5 Feather
- 3.7.6 ASCII
- 3.7.7 Comma-Separated Values
- 3.7.8 Tab-Separated Table
- 3.7.9 IPAC
- 3.7.10 Plain Text
- 3.7.11 HTML
- 3.7.12 LaTeX
- 3.7.13 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.9.5 `hapi`

- 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

- 3.11 Authentication

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