List<EscherRecord> records = new ArrayList<EscherRecord>();
EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
int pos = 0;
while (pos < buffer.length) {
EscherRecord r = recordFactory.createRecord(buffer, pos);
int bytesRead = r.fillFields(buffer, pos, recordFactory);
records.add(r);
pos += bytesRead;
}
assertEquals("data was not fully read", buffer.length, pos);