}
protected ListMap parseAndFormatImpl(Reader reader, boolean format) throws ParseException {
VariableSizeReader varReader = new VariableSizeReader(reader);
ListMap _list = new ListHashMap(256);
List _fieldsList = _spec.getChildren("field");
int currentIdx = 0;
for (Iterator iteratorFields = _fieldsList.iterator(); iteratorFields.hasNext();) {
Element _fieldSpec = (Element) iteratorFields.next();
String _name = _fieldSpec.getAttribute("name").getValue();
Attribute _numEntriesAttr = _fieldSpec.getAttribute("numEntries");
int _length = Integer.parseInt(_fieldSpec.getAttribute("length").getValue());
if (_numEntriesAttr != null) {
int _numEntries = Integer.parseInt(((String) _list.get(_numEntriesAttr.getValue())).trim());
_length *= _numEntries;
}
String _type = _fieldSpec.getAttribute("type").getValue();
String _field = null;
try {