forked from jlawrie/opencsv
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applied patches for 3100865 and 3107754
- Loading branch information
sconway
committed
Apr 15, 2011
1 parent
59258c8
commit 06477ab
Showing
10 changed files
with
476 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package au.com.bytecode.opencsv; | ||
|
||
import java.io.IOException; | ||
import java.util.Iterator; | ||
|
||
public class CSVIterator implements Iterator<String[]> { | ||
private CSVReader reader; | ||
private String[] nextLine; | ||
|
||
public CSVIterator(CSVReader reader) throws IOException { | ||
this.reader = reader; | ||
nextLine = reader.readNext(); | ||
} | ||
|
||
public boolean hasNext() { | ||
return nextLine != null; | ||
} | ||
|
||
public String[] next() { | ||
String[] temp = nextLine; | ||
try { | ||
nextLine = reader.readNext(); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
return temp; | ||
} | ||
|
||
public void remove() { | ||
throw new UnsupportedOperationException("This is a read only iterator."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.