Package org.apache.jmeter.report.core
Class CsvSampleReader
-
- All Implemented Interfaces:
-
java.io.Closeable
,java.lang.AutoCloseable
public class CsvSampleReader implements Closeable
Reader class for reading CSV files.
Handles SampleMetadata reading and sample extraction.
- Since:
3.0
-
-
Field Summary
Fields Modifier and Type Field Description public final SampleMetadata
metadata
-
Constructor Summary
Constructors Constructor Description CsvSampleReader(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
Modifier and Type Method Description SampleMetadata
getMetadata()
Sample
readSample()
Sample
peek()
boolean
hasNext()
void
close()
-
-
Constructor Detail
-
CsvSampleReader
CsvSampleReader(File inputFile, char separator, boolean useSaveSampleCfg)
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
CsvSampleReader(File inputFile, SampleMetadata metadata)
Instantiates a new csv sample reader.- Parameters:
inputFile
- the input file (must not benull
)metadata
- the metadata
-
-
Method Detail
-
getMetadata
SampleMetadata getMetadata()
-
readSample
Sample readSample()
- Returns:
next sample from the file.
-
hasNext
boolean hasNext()
- Returns:
flag, that indicates whether the file contains more samples
-
close
void close()
-
-
-
-