All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.flatpack.StreamingRecord Maven / Gradle / Ivy

Go to download

Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. Maps column positions in the file to user friendly names via XML. See FlatPack Feature List under News for complete feature list.

There is a newer version: 4.0.18
Show newest version
package net.sf.flatpack;

import java.util.Collections;
import java.util.List;
import java.util.Optional;

public class StreamingRecord implements StreamingDataSet {
    private final DataSet dataSet;

    public StreamingRecord(final DataSet dataSet) {
        super();
        this.dataSet = dataSet;
    }

    @Override
    public Optional getRecord() {
        return dataSet.getRecord();
    }

    @Override
    public boolean next() {
        return dataSet != null ? dataSet.next() : false;
    }

    @Override
    public int getErrorCount() {
        return dataSet != null ? dataSet.getErrorCount() : 0;
    }

    @Override
    public List getErrors() {
        return dataSet != null ? dataSet.getErrors() : Collections.emptyList();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy