Package org.apache.jmeter.report.core
Class CsvSampleReader
java.lang.Object
org.apache.jmeter.report.core.CsvSampleReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
Reader class for reading CSV files.
Handles SampleMetadata
reading and sample extraction.
- Since:
- 3.0
-
Constructor Summary
ConstructorDescriptionCsvSampleReader
(File inputFile, char separator, boolean useSaveSampleCfg) Instantiates a new csv sample reader.CsvSampleReader
(File inputFile, SampleMetadata metadata) Instantiates a new csv sample reader. -
Method Summary
-
Constructor Details
-
CsvSampleReader
Instantiates a new csv sample reader.- Parameters:
inputFile
- the input file (must not benull
)separator
- the separatoruseSaveSampleCfg
- indicates whether the reader uses jmeter SampleSaveConfiguration to define metadata
-
CsvSampleReader
Instantiates a new csv sample reader.- Parameters:
inputFile
- the input file (must not benull
)metadata
- the metadata
-
-
Method Details
-
getMetadata
-
readSample
- Returns:
- next sample from the file.
-
peek
- Returns:
- next sample from file but keep the reading file position.
-
hasNext
public boolean hasNext()- Returns:
- flag, that indicates whether the file contains more samples
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-