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.
-
-
Constructor Summary
Constructors Constructor Description AsciiWriter(OutputStream os)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()flushes and closes underlying OutputStream.voidflush()flushes underlying OutputStreamvoidwrite(char[] chars, int offset, int length)All other Writer methods vector through this, so this is the only one that must be overridden.
-
-
-
Constructor Detail
-
AsciiWriter
public AsciiWriter(OutputStream os)
- Parameters:
os- need not be buffered as this class buffers
-
-
Method Detail
-
close
public void close() throws IOExceptionflushes and closes underlying OutputStream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
public void flush() throws IOExceptionflushes underlying OutputStream- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
write
public void write(char[] chars, int offset, int length) throws IOExceptionAll other Writer methods vector through this, so this is the only one that must be overridden.- Specified by:
writein classWriter- Throws:
IOException
-
-