This project provides code to
- Read and write files of length based records (both fixed length records and Length field based records).
- Read and write CSV files.
- Read and Write Flat Fixed width files (Text and Binary) via either a Xml-Record-Layout or a Cobol Copybook..
- Read and write XML files (via StAX parser).
- Common IO routines across all File Types (XML, CSV, Fixed field Width).
- Support for various Flat file formats (Fixed, Delimited, Length based Files (i.e. Mainframe VB).
- Method of reading / writing files should be the same no matter what the file format is.
- Programmer should be shielded from the files format.
- You should be able to edit files using the files description (Cobol Copybook, Xml or what ever).
- Package should be flexible - easy to add new file formats or Record-Layout formats.
The JRecord package consists of
- Low level line IO routines (ByteReader / ByteWriter). These classes read a line
from a file as an array of Bytes (Formats supported include Fixed Length and various Length based file formats).
These could be of interest to any one reading / writing Legacy Files.
- Classes to read / write File-Descriptions to/from external files
- High level IO Routines Supporting field level access.
- Code was written as part of the RecordEditor not as a Java library, This has both advantages and disadvantages:
- The RecordEditor has had 20,000 downloads over several years. Many parts of the package have been well tested
- Some code is there for the RecordEditor making the JRecord package larger that it would be otherwise be.
- Classes minimizing space at the expense of speed. This makes sense in a Editor but not for reading / writing in Java..
- Package is still being adapted for use as a Java package, More work is needed.
- A way of tailoring the conversion of Cobol Copybooks is needed.
- Currently the System has 2 ways of representing a Record-Layout
Having two classes representing the same thing is not ideal. I may provide greater support
for ExternalRecord's through out the package.
There is a class ToLayoutDetail that can convert one to the other
The original format it holds only the bare minimum needed by the package
A general purpose interchange format. This was introduced latter on to
support conversion between file formats / Database (RecordEditor).
- Support for more files Structures
- Support for Shorter Type-Names.
- Greater Flexibility in importing Cobol Copybooks
- Support for more Cobol dialects.
- More work on the Documentation.
- More options for parsing XML files (would be useful to convert child elements to fields).
- One possible change is to have the Open methods return the object. This would allow
AbstractLineReader reader = new XmlLineReader(true).open(filename);
AbstractLineReader reader = LineIOProvider.getInstance()
any thoughts anybody.
- Bettetr class naming standards.