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
which knows about input handlers implementing the
and the generic writer class is
which knows about output handlers implementing the
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
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.7) which deals with table reading and writing using an SQL database.