public abstract class LinedTextWriter extends TextWriter
DataEndpoint.StatecurrentRecordlastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
LinedTextWriter(File file) |
LinedTextWriter(File file,
boolean append) |
LinedTextWriter(Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
protected abstract void |
assembleLine(Record record,
StringBuilder lineBuffer) |
String |
getNewLine() |
LinedTextWriter |
setNewLine(String newLine)
Assigns the string used between each line (defaults to "\n" on Linux and "\r\n" on Windows).
|
protected void |
writeRecord(Record record) |
close, getFile, getWriter, isAppend, isAutoCloseWriter, isFieldNamesInFirstRow, isFlushOnWrite, setAutoCloseWriter, setFlushOnWrite, writeopen, setFieldNamesInFirstRow, writeImplavailable, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, getWriterdecrementRecordCount, 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, setDescriptionpublic LinedTextWriter(File file, boolean append)
file - append - Indicates if writing should start at the end of the file (if it exists). If the specified file exists and has contents
(more than 0 bytes), then the fieldNamesInFirstRow property will be set to false.public LinedTextWriter(File file)
public LinedTextWriter(Writer writer)
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 TextWriterpublic String getNewLine()
public LinedTextWriter setNewLine(String newLine)
protected final void writeRecord(Record record) throws Throwable
writeRecord in class AbstractWriterThrowableprotected abstract void assembleLine(Record record, StringBuilder lineBuffer) throws Throwable
ThrowableCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.