# Class VCFIteratorBuilder

java.lang.Object
htsjdk.variant.vcf.VCFIteratorBuilder

public class VCFIteratorBuilder extends Object
A Class building `VCFIterator` Example:

    VCFIterator r = new VCFIteratorBuilder().open(System.in);
    while (r.hasNext()) {
        System.out.println(r.next());
    }
    r.close();

See Also:
  - `VCFIterator`

## Constructor Summary

Constructors
Constructor
Description
`VCFIteratorBuilder()`

## Method Summary

Modifier and Type
Method
Description
`VCFIterator`
`open(File file)`
creates a VCF iterator from a File
`VCFIterator`
`open(InputStream in)`
creates a VCF iterator from an input stream It detects if the stream is a BCF stream or a GZipped stream.
`VCFIterator`
`open(String path)`
creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.
`VCFIterator`
`open(String path, Function<SeekableByteChannel, SeekableByteChannel> wrapper)`
creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.
`VCFIterator`
`open(Path path)`
creates a VCF iterator from a Path
`VCFIterator`
`open(Path path, Function<SeekableByteChannel, SeekableByteChannel> wrapper)`
creates a VCF iterator from a Path

### Methods inherited from class Object

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

## Constructor Details

### VCFIteratorBuilder

public VCFIteratorBuilder()

## Method Details

### open

public VCFIterator open(InputStream in) throws IOException
creates a VCF iterator from an input stream It detects if the stream is a BCF stream or a GZipped stream.

Parameters:
  `in` - inputstream
Returns:
  the VCFIterator
Throws:
  `IOException`

### open

public VCFIterator open(String path) throws IOException
creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.

Parameters:
  `path` - the Path
Returns:
  the VCFIterator
Throws:
  `IOException`

### open

public VCFIterator open(Path path) throws IOException
creates a VCF iterator from a Path

Parameters:
  `path` - the path
Returns:
  the VCFIterator
Throws:
  `IOException`

### open

public VCFIterator open(Path path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) throws IOException
creates a VCF iterator from a Path

Parameters:
  `path` - the file path
  `wrapper` - wrapper for `SeekablePathStream`. Can be null.
Returns:
  the VCFIterator
Throws:
  `IOException`

### open

public VCFIterator open(String path, Function<SeekableByteChannel, SeekableByteChannel> wrapper) throws IOException
creates a VCF iterator from a URI It detects if the stream is a BCF stream or a GZipped stream.

Parameters:
  `path` - the Path
  `wrapper` - wrapper for `SeekablePathStream`. Can be null.
Returns:
  the VCFIterator
Throws:
  `IOException`

### open

public VCFIterator open(File file) throws IOException
creates a VCF iterator from a File

Parameters:
  `file` - the file (can be bcf, vcf, vcf.gz)
Returns:
  the VCFIterator
Throws:
  `IOException`