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 void
close()
flushes and closes underlying OutputStream.void
flush()
flushes underlying OutputStreamvoid
write(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 IOException
flushes and closes underlying OutputStream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
flush
public void flush() throws IOException
flushes underlying OutputStream- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- 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 classWriter
- Throws:
IOException
-
-