Class DATReader
- java.lang.Object
-
- pulse.io.readers.DATReader
-
- All Implemented Interfaces:
AbstractHandler,AbstractReader<List<ExperimentalData>>,CurveReader,Reflexive
public class DATReader extends Object implements CurveReader
A specific implementation ofCurveReaderused to read.datfiles.This file format has been previously used to export data obtained with the Kvant laser flash analyser. Files with a
.datextension should consist of a one-line header listing the test temperature; second and subsequent lines should be made of two or three tab-delimited data columns. The first column represents time [seconds], and the second column represents the rise of the absolute temperature of the sample over the ambient temperature . Any other columns are ignored by this reader. The temperature rise corresponds to an absolute scale, according to NIST recommendations.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CurveReadergetInstance()As this class uses the singleton pattern, only one instance is created using an empty no-argument constructor.StringgetSupportedExtension()Retrieves the supported extension of files, which thisAbstractHandleris able to process.List<ExperimentalData>read(File file)This will return a singleExperimentalData, which stores all the information available in thefile, wrapped in aListobject with the size of unity.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pulse.io.readers.AbstractHandler
isExtensionSupported
-
-
-
-
Method Detail
-
getSupportedExtension
public String getSupportedExtension()
Description copied from interface:AbstractHandlerRetrieves the supported extension of files, which thisAbstractHandleris able to process.- Specified by:
getSupportedExtensionin interfaceAbstractHandler- Returns:
- a
Stringequal to {.dat}
-
read
public List<ExperimentalData> read(File file) throws IOException
This will return a single
ExperimentalData, which stores all the information available in thefile, wrapped in aListobject with the size of unity. In addition to the time-temperature data loaded directly into theExperimentalDatalists, aMetadataobject will be created for theExperimentalDataand will store the test temperature declared infile.- Specified by:
readin interfaceAbstractReader<List<ExperimentalData>>- Specified by:
readin interfaceCurveReader- Parameters:
file- a '.dat' file, which conforms to the respective format.- Returns:
- a single
ExperimentalDatawrapped in aListwith the size of unity. - Throws:
IOException- if something goes wrong with reading the file
-
getInstance
public static CurveReader getInstance()
As this class uses the singleton pattern, only one instance is created using an empty no-argument constructor.- Returns:
- the single instance of this class.
-
-