@Description(value="Reads data from a Reader and splits it into individual records")
@In(value=java.io.Reader.class)
@Out(value=java.lang.String.class)
@FluxCommand(value="as-records")
public final class RecordReader
extends org.metafacture.framework.helpers.DefaultObjectPipe<java.io.Reader,org.metafacture.framework.ObjectReceiver<java.lang.String>>
Reads data from a Reader and splits it into individual
records.
The default separator is the global separator character (0x001d). Empty records are skipped by default.
| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_SEPARATOR |
| Constructor and Description |
|---|
RecordReader()
Creates an instance of
RecordReader. |
| Modifier and Type | Method and Description |
|---|---|
char |
getSeparator()
Gets the separator
|
boolean |
getSkipEmptyRecords()
Checks whether to skip empty records.
|
void |
process(java.io.Reader reader) |
void |
setSeparator(char separator)
Sets the separator.
|
void |
setSeparator(java.lang.String separator)
Sets the separator.
|
void |
setSkipEmptyRecords(boolean skipEmptyRecords)
Flags to skip empty records.
|
closeStream, getReceiver, isClosed, onCloseStream, onResetStream, onSetReceiver, resetStream, setReceiverpublic static final char DEFAULT_SEPARATOR
public RecordReader()
RecordReader.public void setSeparator(java.lang.String separator)
separator - the separatorpublic void setSeparator(char separator)
separator - the separatorpublic char getSeparator()
public void setSkipEmptyRecords(boolean skipEmptyRecords)
skipEmptyRecords - true if empty records should be skippedpublic boolean getSkipEmptyRecords()
public void process(java.io.Reader reader)
process in interface org.metafacture.framework.ObjectReceiver<java.io.Reader>process in class org.metafacture.framework.helpers.DefaultObjectPipe<java.io.Reader,org.metafacture.framework.ObjectReceiver<java.lang.String>>