|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blackbear.flatworm.FileFormat
public class FileFormat
The FileFormat
is the point of entry into the Flatworm parser. It is generated from the XML Flatworm
description, and can then be used to read a line or lines from a file, determine if there is a matching record
definition for the line(s), and return a HashMap
with the beans created by parsing the input.
Constructor Summary | |
---|---|
FileFormat()
|
Method Summary | |
---|---|
void |
addConverter(com.blackbear.flatworm.Converter converter)
Facilitates the storage of multiple converters. |
void |
addRecord(com.blackbear.flatworm.Record r)
|
ConversionHelper |
getConvertionHelper()
FileFormat is the keeper of ConversionHelper, but does not actually use it. |
java.lang.String |
getLastLine()
|
MatchedRecord |
getNextRecord(java.io.BufferedReader in)
When called with a BufferedReader , reads sufficient lines to parse a record, and returns the
beans created. |
com.blackbear.flatworm.Record |
getRecord(java.lang.String name)
|
java.util.HashMap |
getRecords()
|
void |
setRecords(java.util.HashMap records)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileFormat()
Method Detail |
---|
public java.lang.String getLastLine()
public java.util.HashMap getRecords()
public void setRecords(java.util.HashMap records)
public void addRecord(com.blackbear.flatworm.Record r)
public com.blackbear.flatworm.Record getRecord(java.lang.String name)
public void addConverter(com.blackbear.flatworm.Converter converter)
Converter
- converter to storepublic ConversionHelper getConvertionHelper()
public MatchedRecord getNextRecord(java.io.BufferedReader in) throws FlatwormInvalidRecordException, FlatwormInputLineLengthException, FlatwormConversionException, FlatwormUnsetFieldValueException
BufferedReader
, reads sufficient lines to parse a record, and returns the
beans created.
in
- The stream to read from
FlatwormInvalidRecordException
FlatwormInputLineLengthException
FlatwormConversionException
FlatwormUnsetFieldValueException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |