Arch4J 1.1

org.arch4j.parse
Class FixedRecordReader

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

public class FixedRecordReader
extends RecordReader


Field Summary
 
Fields inherited from class org.arch4j.parse.RecordReader
DATA_TYPE_DATE, DATA_TYPE_NUMBER, DATA_TYPE_TEXT, format
 
Constructor Summary
FixedRecordReader()
           
FixedRecordReader(ReadOnlyProperty aFormat)
           
 
Method Summary
protected  RecordData createRecord(String[] rawBuffer)
          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
 

Constructor Detail

FixedRecordReader

public FixedRecordReader()

FixedRecordReader

public FixedRecordReader(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

initFormatData

protected void initFormatData()
                       throws FormatException
Specified by:
initFormatData in class RecordReader
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[] rawBuffer)
                           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:
rawBuffer - 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.

Arch4J 1.1

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