public class FixedWidthReader extends TextReader
DataEndpoint.StateEOF, readercurrentRecord, fieldNames, lastRow, startingRowfieldLineage, recordLineagelastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
FixedWidthReader(File file) |
FixedWidthReader(Reader reader) |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
FixedWidthReader |
addField(FixedWidthField field) |
FixedWidthReader |
addField(String name,
int width) |
FixedWidthReader |
addField(String name,
int width,
FixedWidthAlign align,
char fillChar) |
FixedWidthReader |
addFields(int... width) |
protected Record |
addLineage(Record record) |
protected boolean |
fillRecord(Record record) |
char |
getFillChar() |
boolean |
isLastFieldConsumesRemaining() |
boolean |
isLineageSupported() |
void |
open()
Makes this endpoint ready for reading or writing.
|
FixedWidthReader |
setDescription(String description) |
FixedWidthReader |
setFieldNames(Collection<String> fieldNames) |
FixedWidthReader |
setFieldNames(String... fieldNames) |
FixedWidthReader |
setFieldNamesInFirstRow(boolean fieldNamesInFirstRow) |
FixedWidthReader |
setFillChar(char fillChar) |
FixedWidthReader |
setLastFieldConsumesRemaining(boolean lastFieldConsumesRemaining)
Set whether the last field in each record will contain the rest of each line.
|
FixedWidthReader |
setLastRow(int lastRow) |
FixedWidthReader |
setSaveLineage(boolean saveLineage) |
FixedWidthReader |
setSkipEmptyRows(boolean skipEmptyRows)
Indicates that rows with only null values should not be returned by the reader (default is false).
|
FixedWidthReader |
setStartingRow(int startingRow) |
FixedWidthReader |
skipField(int width) |
available, close, getFile, getLineNumber, readImplgetFieldNames, getLastRow, getStartingRow, isFieldNamesInFirstRow, isSkipEmptyRows, readgetBufferSize, getNestedEndpoint, getNestedReader, getReader, getRootEndpoint, getRootReader, isExhausted, isSaveLineage, peek, pop, push, skipdecrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toStringaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTimepublic FixedWidthReader(File file)
public FixedWidthReader(Reader reader)
public char getFillChar()
public FixedWidthReader setFillChar(char fillChar)
public boolean isLastFieldConsumesRemaining()
public FixedWidthReader setLastFieldConsumesRemaining(boolean lastFieldConsumesRemaining)
false.public FixedWidthReader addField(FixedWidthField field)
public FixedWidthReader addFields(int... width)
public FixedWidthReader addField(String name, int width)
public FixedWidthReader addField(String name, int width, FixedWidthAlign align, char fillChar)
public FixedWidthReader skipField(int width)
public FixedWidthReader setFieldNamesInFirstRow(boolean fieldNamesInFirstRow)
setFieldNamesInFirstRow in class AbstractReaderpublic FixedWidthReader setFieldNames(String... fieldNames)
setFieldNames in class AbstractReaderpublic FixedWidthReader setFieldNames(Collection<String> fieldNames)
setFieldNames in class AbstractReaderpublic FixedWidthReader setStartingRow(int startingRow)
setStartingRow in class AbstractReaderpublic FixedWidthReader setLastRow(int lastRow)
setLastRow in class AbstractReaderpublic FixedWidthReader setSkipEmptyRows(boolean skipEmptyRows)
AbstractReadersetSkipEmptyRows in class AbstractReaderpublic FixedWidthReader setSaveLineage(boolean saveLineage)
setSaveLineage in class DataReaderpublic FixedWidthReader setDescription(String description)
setDescription in class Endpointpublic DataException addExceptionProperties(DataException exception)
EndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties in class TextReaderpublic void open()
throws DataException
DataEndpointopen in class TextReaderDataExceptionprotected boolean fillRecord(Record record) throws Throwable
fillRecord in class AbstractReaderThrowablepublic boolean isLineageSupported()
isLineageSupported in class DataReaderprotected Record addLineage(Record record)
addLineage in class TextReaderCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.