Summer.Batch.Extra.Ebcdic.EbcdicReader Class Reference

An EbcdicReader reads bytes from an input stream and returns records, according to a copybook. Each call to NextRecord returns a list of objects, containing the decoded values of the fields. When there are no more records to read, it returns null. Copybooks with multiple records are supported. The reader relies on the position get/set methods of the input stream to detect the format of the current record. More...

Public Member Functions

 EbcdicReader (BufferedStream inputStream, FileFormat fileFormat, bool hasRdw)
 Constructs an EbcdicReader. More...
 
List< object > NextRecord ()
 Returns the next record as a list of objects. More...
 

Detailed Description

An EbcdicReader reads bytes from an input stream and returns records, according to a copybook. Each call to NextRecord returns a list of objects, containing the decoded values of the fields. When there are no more records to read, it returns null. Copybooks with multiple records are supported. The reader relies on the position get/set methods of the input stream to detect the format of the current record.

Constructor & Destructor Documentation

Summer.Batch.Extra.Ebcdic.EbcdicReader.EbcdicReader ( BufferedStream  inputStream,
FileFormat  fileFormat,
bool  hasRdw 
)

Constructs an EbcdicReader.

Parameters
inputStreamthe stream to read the data from
fileFormatthe copybook to use for decoding records
hasRdwtrue if records have a record descriptor word (RDW)

Member Function Documentation

List<object> Summer.Batch.Extra.Ebcdic.EbcdicReader.NextRecord ( )

Returns the next record as a list of objects.

Returns
a list containing the decoded fields of the record. If there are multiple record formats, the first item in the list is the discriminator value. Returns null if there are no more records.
Exceptions
IOException 
EbcdicException 

The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Ebcdic/EbcdicReader.cs