Package htsjdk.samtools.util

# Class AsciiWriter

java.lang.Object
java.io.Writer
htsjdk.samtools.util.AsciiWriter

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public class AsciiWriter extends Writer
Fast (I hope) buffered Writer that converts char to byte merely by casting, rather than charset conversion.

## Field Summary

### Fields inherited from class java.io.Writer

`lock`

## Constructor Summary

Constructors
Constructor
Description
`AsciiWriter(OutputStream os)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
flushes and closes underlying OutputStream.
`void`
`flush()`
flushes underlying OutputStream
`void`
`write(char[] chars, int offset, int length)`
All other Writer methods vector through this, so this is the only one that must be overridden.

### Methods inherited from class java.io.Writer

`append, append, append, nullWriter, write, write, write, write`

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

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

## Constructor Details

### AsciiWriter

public AsciiWriter(OutputStream os)

Parameters:
  `os` - need not be buffered as this class buffers

## Method Details

### close

public void close() throws IOException
flushes and closes underlying OutputStream.

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

### flush

public void flush() throws IOException
flushes underlying OutputStream

Specified by:
  `flush` in interface `Flushable`
Specified by:
  `flush` in class `Writer`
Throws:
  `IOException`

### write

public void write(char[] chars, int offset, int length) throws IOException
All other Writer methods vector through this, so this is the only one that must be overridden.

Specified by:
  `write` in class `Writer`
Throws:
  `IOException`