com.waveset.util
Interface FlatFileIterator

All Known Implementing Classes:
CSVParser, DelimitedFileParser, FlatFileDiffIterator, LDIFParser, PipeDelimitedParser

public interface FlatFileIterator

This interface is provided for use with the Flat File ActiveSync Adapter. The constructor of an implementation of this interface should expect to receive the String file path and initialize an appropriate handle to the flat file to verify the file exists and is accessible. The FlatFileActiveSyncAdapter will continue to fetch the nextRecord while hasNext returns true. Implementations can expect close to be called once hasNext returns false and should close any open streams or readers. Copyright (c) 2004 Sun Microsystems

Version:
1.0

Method Summary
 void close()
          Intended for clean up of any open streams or readers.
 boolean hasNext()
          Indicates whether more records exist to read from the flat file.
 java.util.Map nextRecord()
          Converts a record in the flat file to a map of attribute name/value pairs.
 

Method Detail

hasNext

public boolean hasNext()
Indicates whether more records exist to read from the flat file.

Returns:
true if another record is available for processing from the flat file, false if not.

nextRecord

public java.util.Map nextRecord()
                         throws java.io.IOException
Converts a record in the flat file to a map of attribute name/value pairs.

Returns:
map of attribute name/value pairs for a record in the flat file.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Intended for clean up of any open streams or readers.

Throws:
java.io.IOException