Package htsjdk.samtools.fastq

# Class BasicFastqWriter

java.lang.Object
htsjdk.samtools.fastq.BasicFastqWriter

All Implemented Interfaces:
  `Writer<FastqRecord>`, `FastqWriter`, `Closeable`, `Flushable`, `AutoCloseable`

public class BasicFastqWriter extends Object implements FastqWriter, Flushable
In general FastqWriterFactory should be used so that AsyncFastqWriter can be enabled, but there are some cases in which that behavior is explicitly not wanted.

## Constructor Summary

Constructors
Constructor
Description
`BasicFastqWriter(File file)`
`BasicFastqWriter(File file, boolean createMd5)`
`BasicFastqWriter(PrintStream writer)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`flush()`
`void`
`write(FastqRecord rec)`
Writes one item.

### Methods inherited from class java.lang.Object

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

### Methods inherited from interface htsjdk.io.Writer

`write`

## Constructor Details

### BasicFastqWriter

public BasicFastqWriter(File file)

### BasicFastqWriter

public BasicFastqWriter(File file, boolean createMd5)

### BasicFastqWriter

public BasicFastqWriter(PrintStream writer)

## Method Details

### write

public void write(FastqRecord rec)
Description copied from interface: `Writer`
Writes one item.

Specified by:
  `write` in interface `FastqWriter`
Specified by:
  `write` in interface `Writer<FastqRecord>`
Parameters:
  `rec` - the item to write.

### flush

public void flush()

Specified by:
  `flush` in interface `Flushable`

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `FastqWriter`