public abstract class AbstractWriter extends Object implements Writer
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
lineSeparator  | 
| Constructor and Description | 
|---|
AbstractWriter(Writer output)  | 
AbstractWriter(Writer writer,
              String lineSeparator)  | 
| Modifier and Type | Method and Description | 
|---|---|
Writer | 
addRecordEntry(String columnName,
              Object value)  | 
void | 
close()  | 
Writer | 
flush()  | 
protected Map<String,Object> | 
getRowMap()  | 
Writer | 
nextRecord()
Writes a newline to the output and discards the  
rowMap. | 
protected abstract boolean | 
validateColumnTitle(String columnTitle)
Subclasses must implement this method to perform validation of
  
columnTitle. | 
protected void | 
write(char character)  | 
protected void | 
write(char[] characters)  | 
protected void | 
write(Object val)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprintFooter, printHeaderprotected String lineSeparator
public AbstractWriter(Writer output)
public Writer addRecordEntry(String columnName, Object value)
addRecordEntry in interface Writerprotected abstract boolean validateColumnTitle(String columnTitle)
columnTitle.columnTitle - title of the column to be filledtrue if the column title is valid else return
         false.public Writer nextRecord() throws IOException
rowMap.
 
 This method must be overridden by subclasses to write out the record data
 stored in rowMap. Overriders must call
 super.nextRecord() as the last call in their implementation.
nextRecord in interface WriterIOExceptionprotected void write(Object val) throws IOException
IOExceptionprotected void write(char character)
              throws IOException
IOExceptionprotected void write(char[] characters)
              throws IOException
IOExceptionpublic Writer flush() throws IOException
flush in interface WriterIOExceptionpublic void close()
           throws IOException
close in interface AutoCloseableclose in interface WriterIOExceptionCopyright © 2006–2021 Appendium - Portfolio Financing Platform. All rights reserved.