public class CsvSampleReader extends Object implements Closeable
Handles SampleMetadata
reading and sample extraction.
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the reader.
|
SampleMetadata |
getMetadata()
Gets the metadata.
|
boolean |
hasNext()
Indicates whether the file contains more samples
|
Sample |
peek()
Gets next sample from file but keep the reading file position.
|
Sample |
readSample()
Gets next sample from the file.
|
public CsvSampleReader(File inputFile, char separator, boolean useSaveSampleCfg)
inputFile
- the input file (must not be null
)separator
- the separatoruseSaveSampleCfg
- indicates whether the reader uses jmeter
SampleSaveConfiguration to define metadatapublic CsvSampleReader(File inputFile, SampleMetadata metadata)
inputFile
- the input file (must not be null
)metadata
- the metadatapublic SampleMetadata getMetadata()
public Sample readSample()
public Sample peek()
public boolean hasNext()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 1998-2016 Apache Software Foundation. All Rights Reserved.