# Class GZIIndex.GZIIndexer

java.lang.Object
htsjdk.samtools.util.GZIIndex.GZIIndexer

All Implemented Interfaces:
  `Closeable, AutoCloseable`

Enclosing class:
  `GZIIndex`

public static final class GZIIndex.GZIIndexer extends Object implements Closeable
Helper class for constructing the GZIindex. In order to construct a GZI index addGzipBlock() should be called every time a new Gzip Block is written out and the entire index will be written out when close() is called.

## Constructor Summary

Constructors
Constructor
Description
`GZIIndexer(OutputStream outputStream)`
`GZIIndexer(Path outputFile)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addGzipBlock(long compressedFileOffset, long uncompressedBlockSize)`
`void`
`close()`

### Methods inherited from class Object

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

## Constructor Details

### GZIIndexer

public GZIIndexer(OutputStream outputStream)

### GZIIndexer

public GZIIndexer(Path outputFile) throws IOException

Throws:
  `IOException`

## Method Details

### addGzipBlock

public void addGzipBlock(long compressedFileOffset, long uncompressedBlockSize)

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Throws:
  `IOException`