public class LineWriter extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
append |
(package private) boolean |
escapeNewlines |
(package private) File |
file |
(package private) String |
format |
(package private) PrintStream |
out |
context| Constructor and Description |
|---|
LineWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
finish() |
File |
getFile() |
String |
getFormat() |
void |
init(ProcessContext ctx) |
boolean |
isAppend() |
boolean |
isEscapeNewlines() |
Data |
process(Data input) |
void |
setAppend(boolean append) |
void |
setEscapeNewlines(boolean escapeNewlines) |
void |
setFile(File file) |
void |
setFormat(String format) |
resetStateFile file
boolean append
PrintStream out
String format
boolean escapeNewlines
public File getFile()
@Parameter(required=true, description="Name of the file to write to.") public void setFile(File file)
file - the file to setpublic String getFormat()
@Parameter(required=true, description="The format string, containing macros that are expanded for each item") public void setFormat(String format)
format - the format to setpublic boolean isAppend()
@Parameter(required=false, description="Denotes whether to append to existing files or create a new file at container startup.", defaultValue="false") public void setAppend(boolean append)
append - the append to setpublic boolean isEscapeNewlines()
@Parameter(required=false, description="Whether to escape newlines contained in the attributes or not.") public void setEscapeNewlines(boolean escapeNewlines)
escapeNewlines - the escapeNewlines to setpublic void init(ProcessContext ctx) throws Exception
init in interface StatefulProcessorinit in class AbstractProcessorExceptionAbstractProcessor.init(stream.ProcessContext)public Data process(Data input)
Processor.process(stream.Data)public void finish()
throws Exception
finish in interface StatefulProcessorfinish in class AbstractProcessorExceptionAbstractProcessor.finish()Copyright © 2018. All rights reserved.