Revision 42775 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/simplereaders/FixedLenReader.java
FixedLenReader.java | ||
---|---|---|
6 | 6 |
import java.io.IOException; |
7 | 7 |
import java.util.ArrayList; |
8 | 8 |
import java.util.List; |
9 |
import org.apache.commons.lang3.StringUtils; |
|
9 | 10 |
import org.gvsig.fmap.dal.store.csv.CSVStoreParameters; |
10 | 11 |
|
11 | 12 |
|
... | ... | |
39 | 40 |
return header; |
40 | 41 |
} |
41 | 42 |
|
43 |
@Override |
|
44 |
public int getColumnsCount() throws IOException { |
|
45 |
return this.fieldCount; |
|
46 |
} |
|
47 |
|
|
42 | 48 |
public List<String> read() throws IOException { |
43 | 49 |
String line = this.reader.readLine(); |
44 | 50 |
this.currentLine++; |
45 |
while( line!=null && this.commentStartMarker!=null && line.startsWith(this.commentStartMarker) ) {
|
|
51 |
while( !StringUtils.isEmpty(line) && !StringUtils.isEmpty(this.commentStartMarker) && line.startsWith(this.commentStartMarker) ) {
|
|
46 | 52 |
line = this.reader.readLine(); |
47 | 53 |
this.currentLine++; |
48 | 54 |
} |
Also available in: Unified diff