# Class FASTADecoderV1_0

java.lang.Object
htsjdk.beta.codecs.hapref.fasta.FASTADecoderV1_0

All Implemented Interfaces:
  `HaploidReferenceDecoder, HtsDecoder<SAMSequenceDictionary, ReferenceSequence>, HtsQuery<ReferenceSequence>, Closeable, AutoCloseable, Iterable<ReferenceSequence>`

public class FASTADecoderV1_0 extends Object implements HaploidReferenceDecoder
The v1.0 FASTA decoder.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Bundle`
`inputBundle`

## Constructor Summary

Constructors
Constructor
Description
`FASTADecoderV1_0(Bundle inputBundle)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Close any resources associated with this decoder.
`String`
`getDisplayName()`
Get a user-friendly display name for this decoder.
`final String`
`getFileFormat()`
Get the name of the file format supported by this decoder.The format name defines the underlying format handled by this decoder, and also corresponds to the format of the primary bundle resource that is required when decoding (see `BundleResourceType` and `BundleResource.getFileFormat()`).
`SAMSequenceDictionary`
`getHeader()`
Get the file header for this decoder.
`ReferenceSequenceFile`
`getReferenceSequenceFile()`
`HtsVersion`
`getVersion()`
Get the version of the file format supported by this decoder.
`boolean`
`hasIndex()`
Return true if the underlying resource has an index.
`boolean`
`isQueryable()`
Gte true if the underlying resource is queryable.
`CloseableIterator<ReferenceSequence>`
`iterator()`
Get an iterator of all records in the underlying resource.

### Methods inherited from class Object

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

### Methods inherited from interface HtsQuery

`query, query, query, query, queryContained, queryContained, queryContained, queryOverlapping, queryOverlapping, queryOverlapping, queryStart`

### Methods inherited from interface Iterable

`forEach, spliterator`

## Field Details

### inputBundle

protected Bundle inputBundle

## Constructor Details

### FASTADecoderV1_0

public FASTADecoderV1_0(Bundle inputBundle)

## Method Details

### getDisplayName

public String getDisplayName()
Description copied from interface: `HtsDecoder`
Get a user-friendly display name for this decoder.

Specified by:
  `getDisplayName` in interface `HtsDecoder<SAMSequenceDictionary, ReferenceSequence>`
Returns:
  a user-friendly display name for this decoder for use in error and warning messages

### getFileFormat

public final String getFileFormat()
Description copied from interface: `HtsDecoder`
Get the name of the file format supported by this decoder.The format name defines the underlying format handled by this decoder, and also corresponds to the format of the primary bundle resource that is required when decoding (see `BundleResourceType` and `BundleResource.getFileFormat()`).

Specified by:
  `getFileFormat` in interface `HtsDecoder<SAMSequenceDictionary, ReferenceSequence>`
Returns:
  the name of the underlying file format handled by this decoder

### getHeader

public SAMSequenceDictionary getHeader()
Description copied from interface: `HtsDecoder`
Get the file header for this decoder.

Specified by:
  `getHeader` in interface `HtsDecoder<SAMSequenceDictionary, ReferenceSequence>`
Returns:
  the file header for this decoder, of type `H`

### getVersion

public HtsVersion getVersion()
Description copied from interface: `HtsDecoder`
Get the version of the file format supported by this decoder.

Specified by:
  `getVersion` in interface `HtsDecoder<SAMSequenceDictionary, ReferenceSequence>`

### iterator

public CloseableIterator<ReferenceSequence> iterator()
Description copied from interface: `HtsQuery`
Get an iterator of all records in the underlying resource.

Specified by:
  `iterator` in interface `HtsQuery<ReferenceSequence>`
Specified by:
  `iterator` in interface `Iterable<ReferenceSequence>`
Returns:
  an iterator of all records in the underlying resource

### isQueryable

public boolean isQueryable()
Description copied from interface: `HtsQuery`
Gte true if the underlying resource is queryable.

Specified by:
  `isQueryable` in interface `HtsQuery<ReferenceSequence>`
Returns:
  true if the underlying resource is queryable. this may be true even if the underlying resource returns false for `HtsQuery.hasIndex()`

### hasIndex

public boolean hasIndex()
Description copied from interface: `HtsQuery`
Return true if the underlying resource has an index.

Specified by:
  `hasIndex` in interface `HtsQuery<ReferenceSequence>`
Returns:
  true if the underlying resource has an index

### getReferenceSequenceFile

@InternalAPI public ReferenceSequenceFile getReferenceSequenceFile()

### close

public void close()
Description copied from interface: `HtsDecoder`
Close any resources associated with this decoder.

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `HtsDecoder<SAMSequenceDictionary, ReferenceSequence>`