# Spec FormattedFileIn
Base class for reading formatted files.

Extends | FormattedFile
All Extended | FormattedFile
All Subcl's | BamFileIn, BedFileIn, BlastTabularFileIn, GffFileIn, RoiFileIn, SeqFileIn, SimpleIntervalsFileIn, UcscFileIn, VcfFileIn
Defined in | <seqan/stream.h>
Signature | `typedef FormattedFile<TFileFormat, Input, TSpec> FormattedFileIn;`

## Member Function Overview

### Member Functions Inherited From FormattedFile

- `getFileExtensions`
- `operatorTDependentContext`

## Interface Function Overview

- `void readHeader(fileIn, header);`
  Read one FormattedFileHeaderConcept from a FormattedFileIn object.
- `void readRecord(fileIn, record);`
  Read one FormattedFileRecordConcept from a FormattedFileIn object.

### Interface Functions Inherited From FormattedFile

- `atEnd`
- `close`
- `context`
- `format`
- `FormattedFile`
- `getFileExtensions`
- `guessFormat`
- `open`
- `setFormat`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From FormattedFile

- `FileFormat`
- `FormattedFileContext`

## Detailed Description

A formatted input file can write Header and Records.

## Interface Functions Detail

### `void readHeader(fileIn, header);`

Read one FormattedFileHeaderConcept from a FormattedFileIn object.

#### Parameters

`fileIn` | The FormattedFileIn object to read from.
`header` | The FormattedFileHeaderConcept to read.

#### Thrown Exceptions

`IOError` | On low-level I/O errors.
`ParseError` | On high-level file format errors.

#### Data Races

Thread safety unknown!

### `void readRecord(fileIn, record);`

Read one FormattedFileRecordConcept from a FormattedFileIn object.

#### Parameters

`fileIn` | The FormattedFileIn object to read from.
`record` | The FormattedFileRecordConcept to read.

#### Thrown Exceptions

`IOError` | On low-level I/O errors.
`ParseError` | On high-level file format errors.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @class FormattedFileIn
     *
     * @extends FormattedFile
     *
     * @headerfile <seqan/stream.h>
     *
     * @brief Base class for reading formatted files.
     *
     * @signature typedef FormattedFile<TFileFormat, Input, TSpec> FormattedFileIn;
     *
     * A formatted input file can write @link FormattedFileHeaderConcept Header
     * @endlink and @link FormattedFileRecordConcept Records @endlink.
     *
     * @fn FormattedFileIn#readHeader
     *
     * @brief Read one @link FormattedFileHeaderConcept @endlink from a @link
     *        FormattedFileIn @endlink object.
     *
     * @signature void readHeader(fileIn, header);
     *
     * @param[in,out] fileIn The @link FormattedFileIn @endlink object to read from.
     * @param[in] header The @link FormattedFileHeaderConcept @endlink to read.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     *
     * @fn FormattedFileIn#readRecord
     *
     * @brief Read one @link FormattedFileRecordConcept @endlink from a @link
     *        FormattedFileIn @endlink object.
     *
     * @signature void readRecord(fileIn, record);
     *
     * @param[in,out] fileIn The @link FormattedFileIn @endlink object to read from.
     * @param[in] record The @link FormattedFileRecordConcept @endlink to read.
     *
     * @throw IOError On low-level I/O errors.
     * @throw ParseError On high-level file format errors.
     */