FlatRecordReader Class (Extends RecordReader)

Overview

The FlatRecordReader introduces only a few new attributes but has some new and overridden methods. It inherits several attributes and methods from its RecordReader and RecordHandler base classes (see Chapter 6).

Attributes:

  • Integer Fixed Record Length

  • Integer Record ID Field Offset

  • Integer Record ID Field Length

Methods:

  • Constructor

  • getFieldValue

  • getRecordType

  • parseRecord

  • readRecord

  • readRecordFixedLength

Methods

Constructor

In the FlatRecordReader constructor method, we primarily retrieve values from the file description document that the reader needs for processing. The logic should look familiar by now.

Logic for the FlatRecordReader Constructor Method
 Arguments: DOM Document File Description ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.