com.northconcepts.datapipeline.core
Class LinedTextWriter

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataWriter
          extended by com.northconcepts.datapipeline.core.AbstractWriter
              extended by com.northconcepts.datapipeline.core.TextWriter
                  extended by com.northconcepts.datapipeline.core.LinedTextWriter
Direct Known Subclasses:
CSVWriter, FixedWidthWriter

public abstract class LinedTextWriter
extends TextWriter

Abstract super-class for writing records to a text stream.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.AbstractWriter
currentRecord
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
LinedTextWriter(File file)
           
LinedTextWriter(Writer writer)
           
 
Method Summary
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
protected abstract  void assembleLine(Record record, StringBuffer lineBuffer)
           
 String getNewLine()
           
 LinedTextWriter setNewLine(String newLine)
           
protected  void writeRecord(Record record)
           
 
Methods inherited from class com.northconcepts.datapipeline.core.TextWriter
close, getFile, getWriter
 
Methods inherited from class com.northconcepts.datapipeline.core.AbstractWriter
isFieldNamesInFirstRow, open, setFieldNamesInFirstRow, write, writeImpl
 
Methods inherited from class com.northconcepts.datapipeline.core.DataWriter
getNestedWriter, getRootWriter
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinedTextWriter

public LinedTextWriter(File file)

LinedTextWriter

public LinedTextWriter(Writer writer)
Method Detail

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class TextWriter

getNewLine

public String getNewLine()

setNewLine

public LinedTextWriter setNewLine(String newLine)

writeRecord

protected final void writeRecord(Record record)
                          throws Throwable
Specified by:
writeRecord in class AbstractWriter
Throws:
Throwable

assembleLine

protected abstract void assembleLine(Record record,
                                     StringBuffer lineBuffer)
                              throws Throwable
Throws:
Throwable


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.