public abstract class AbstractWriter extends DataWriter
writeRecord(Record).DataEndpoint.State| Modifier and Type | Field and Description |
|---|---|
protected Record |
currentRecord |
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
AbstractWriter() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
boolean |
isFieldNamesInFirstRow() |
void |
open()
Makes this endpoint ready for reading or writing.
|
AbstractWriter |
setFieldNamesInFirstRow(boolean fieldNamesInFirstRow) |
void |
write(Record record)
Writes the specified record to this
DataWriter and increases the record-count by 1. |
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter. |
protected abstract void |
writeRecord(Record record) |
available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, getWriterclose, decrementRecordCount, 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, setCaptureElapsedTime, setDescriptionprotected Record currentRecord
public 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 DataWriterpublic AbstractWriter setFieldNamesInFirstRow(boolean fieldNamesInFirstRow)
public boolean isFieldNamesInFirstRow()
public void open()
DataEndpointopen in class DataEndpointpublic void write(Record record) throws DataException
DataWriterDataWriter and increases the record-count by 1.
Any exception raised while writing will be converted to a DataException using DataObject.exception(Throwable).
Subclasses generally do not need to override this method, instead they should implement DataWriter.writeImpl(Record).
write in class DataWriterDataExceptionprotected void writeImpl(Record record) throws Throwable
DataWriterDataWriter.writeImpl in class DataWriterThrowableCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.