Package org.apache.ofbiz.datafile
Class RecordIterator
java.lang.Object
org.apache.ofbiz.datafile.RecordIterator
Record Iterator for reading large files
Note: this is a memory intensive and will not handle files that exceed memory.
-
Constructor Summary
ConstructorDescriptionRecordIterator
(InputStream dataFileStream, ModelDataFile modelDataFile, String locationInfo) RecordIterator
(URL fileUrl, ModelDataFile modelDataFile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close.boolean
hasNext()
Has next boolean.next()
Next record.protected void
setupStream
(InputStream dataFileStream, String locationInfo) Sets stream.
-
Constructor Details
-
RecordIterator
- Throws:
DataFileException
-
RecordIterator
public RecordIterator(InputStream dataFileStream, ModelDataFile modelDataFile, String locationInfo) throws DataFileException - Throws:
DataFileException
-
-
Method Details
-
setupStream
protected void setupStream(InputStream dataFileStream, String locationInfo) throws DataFileException Sets stream.- Parameters:
dataFileStream
- the data file streamlocationInfo
- the location info- Throws:
DataFileException
- the data file exception
-
hasNext
public boolean hasNext()Has next boolean.- Returns:
- the boolean
-
next
Next record.- Returns:
- the record
- Throws:
DataFileException
- the data file exception
-
close
Close.- Throws:
DataFileException
- the data file exception
-