maito.datacollecting.quickformat
Class QuickformatRecordParser

java.lang.Object
  extended by maito.datacollecting.quickformat.QuickformatRecordParser
All Implemented Interfaces:
RecordParser

public class QuickformatRecordParser
extends java.lang.Object
implements RecordParser

Parses records from an incoming quickformat stream

Version:
1.0
Author:
Väinö Ala-Härkönen

Constructor Summary
QuickformatRecordParser(RecordConstructor recordConstructor, DataStorage dataStorage)
           
 
Method Summary
 void putData(java.lang.String part)
          Adds the part to the internal buffer and checks out if there's a full record in the buffer already.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickformatRecordParser

public QuickformatRecordParser(RecordConstructor recordConstructor,
                               DataStorage dataStorage)
Method Detail

putData

public void putData(java.lang.String part)
Adds the part to the internal buffer and checks out if there's a full record in the buffer already. If a full record is found, constructs a Record with the specified RecordConstructor and passes it on to the DataStorage. If several full Records are found in buffer, does the same to them all. NOTE: Your data source must send a null string as end of data signal so the last record will get processed

Specified by:
putData in interface RecordParser
Parameters:
part - The next part of the record data or null if end-of-data