public class JSONWriter extends AbstractWriter
This is a simple JSON writer that will write all data items into JSON strings (one line for each item).
| Modifier and Type | Field and Description |
|---|---|
(package private) static org.slf4j.Logger |
log |
(package private) PrintStream |
p |
keys, urlconditioncontext| Constructor and Description |
|---|
JSONWriter() |
JSONWriter(File file) |
JSONWriter(OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
init(ProcessContext ctx) |
void |
write(Data datum)
This method is actually responsible for writing the data item to the
output stream in the format that the implementing class supports.
|
getKeys, getUrl, processMatchingData, selectedKeys, setKeys, setUrlgetCondition, matches, process, setConditionfinish, resetStatestatic org.slf4j.Logger log
PrintStream p
public JSONWriter()
public JSONWriter(File file) throws IOException
IOExceptionpublic JSONWriter(OutputStream out) throws IOException
IOExceptionpublic void init(ProcessContext ctx) throws Exception
init in interface StatefulProcessorinit in class AbstractProcessorExceptionAbstractProcessor.init(stream.ProcessContext)public void write(Data datum)
AbstractWriterwrite in class AbstractWriterCsvWriter.write(stream.Data)Copyright © 2018. All rights reserved.