public class LineEncoder extends Object implements AutoCloseable
BufferedWriter
as iteration of lines into FileOutput
.
Unlike embulk-core
's org.embulk.spi.util.LineEncoder
, it does not receive a task-defining
interface like EncoderTask
. Use of(FileOutput, Newline, Charset, BufferAllocator)
instead.
LineEncoder encoder = LineEncoder.of(fileOutput, newline, charset, Exec.getBufferAllocator());
Modifier and Type | Method and Description |
---|---|
void |
addLine(String line) |
void |
addNewLine() |
void |
addText(String text) |
void |
close() |
void |
finish() |
void |
nextFile() |
static LineEncoder |
of(FileOutput fileOutput,
Newline newline,
Charset charset,
BufferAllocator bufferAllocator) |
public static LineEncoder of(FileOutput fileOutput, Newline newline, Charset charset, BufferAllocator bufferAllocator)
public void addNewLine()
public void addLine(String line)
public void addText(String text)
public void nextFile()
public void finish()
public void close()
close
in interface AutoCloseable