Arch4J 1.1

org.arch4j.parse
Class DelimitedRecordReader

java.lang.Object
  |
  +--org.arch4j.parse.RecordReader
        |
        +--org.arch4j.parse.DelimitedRecordReader

public class DelimitedRecordReader
extends RecordReader


Field Summary
static int DEFAULT_DELIMITER
           
 
Fields inherited from class org.arch4j.parse.RecordReader
DATA_TYPE_DATE, DATA_TYPE_NUMBER, DATA_TYPE_TEXT, format
 
Constructor Summary
DelimitedRecordReader()
           
DelimitedRecordReader(ReadOnlyProperty aFormat)
           
 
Method Summary
protected  RecordData createRecord(String[] rawData)
          create an RecordData object from a raw data buffer, based on the format properties.
protected  String[] getRawRecord(BufferedReader reader, String[] rawBuffer)
          get the next set of raw data from the input stream, or return null if at the end of the stream.
protected  void initFormatData()
           
 void setFormat(ReadOnlyProperty aFormat)
          provide the readed with the property tree that defines the format of the files it must read.
 
Methods inherited from class org.arch4j.parse.RecordReader
convertType, read, rejectRecord, removeQuotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELIMITER

public static final int DEFAULT_DELIMITER
See Also:
Constant Field Values
Constructor Detail

DelimitedRecordReader

public DelimitedRecordReader()

DelimitedRecordReader

public DelimitedRecordReader(ReadOnlyProperty aFormat)
                      throws FormatException
Method Detail

setFormat

public void setFormat(ReadOnlyProperty aFormat)
               throws FormatException
Description copied from class: RecordReader
provide the readed with the property tree that defines the format of the files it must read.

Overrides:
setFormat in class RecordReader
Parameters:
aFormat - property tree defining file format. See subclass implementations.
FormatException

getRawRecord

protected String[] getRawRecord(BufferedReader reader,
                                String[] rawBuffer)
                         throws RecordDataInputException,
                                IOException
Description copied from class: RecordReader
get the next set of raw data from the input stream, or return null if at the end of the stream.

Specified by:
getRawRecord in class RecordReader
Parameters:
reader - buffered reader servicing the raw data input stream.
rawBuffer - raw data buffer to reuse for this record if possible. Could be null.
Returns:
filled raw data buffer
RecordDataInputException
IOException

createRecord

protected RecordData createRecord(String[] rawData)
                           throws FormatException,
                                  RecordDataInputException
Description copied from class: RecordReader
create an RecordData object from a raw data buffer, based on the format properties.

Specified by:
createRecord in class RecordReader
Parameters:
rawData - raw record data
Returns:
populated record object
Throws:
RecordDataInputException - when there is a problem retreiving data from this record, but processing of further records can continue.
FormatException - when there is a fundamental problem with the record format definition and all processing should cease.

initFormatData

protected void initFormatData()
                       throws FormatException
Specified by:
initFormatData in class RecordReader
FormatException

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.