public abstract class AbstractSampleWriter extends SampleWriter
Handles buffering and output writer replacement.
When a writer is set on the sample writer any previous writer is flushed and closed before being replaced by the new one.
| Modifier and Type | Field and Description |
|---|---|
protected java.io.PrintWriter |
writer
output writer to write samples to
|
| Constructor and Description |
|---|
AbstractSampleWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method is guaranteed to not throw any exception.
|
void |
setOutputFile(java.io.File output)
Set the destination file in which this sample writer will write samples
|
void |
setOutputStream(java.io.OutputStream out)
Instructs this sample writer to write samples on the specified output
with UTG-8 encoding.
|
void |
setWriter(java.io.Writer newWriter)
Set the new writer on which samples will be written by this sample writer.
|
writepublic void setWriter(java.io.Writer newWriter)
newWriter - The destination writer where samples will be written by this
sample writerpublic void setOutputStream(java.io.OutputStream out)
SaveService.getFileEncoding(String)out - The output stream on which sample should be writtenpublic void setOutputFile(java.io.File output)
output - The output file that will receive samples written by this
sample writerpublic void close()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.