public class CmsFileWriter extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static int |
HEADER_LENGTH
The length of the file header.
|
Constructor and Description |
---|
CmsFileWriter(File outputFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSpectrum(String spectrumTitle,
Spectrum spectrum)
Adds a spectrum to the file.
|
void |
close() |
public CmsFileWriter(File outputFile) throws FileNotFoundException, IOException
outputFile
- the output file.FileNotFoundException
- Exception thrown if the output file was not
found.IOException
- Exception thrown if an error occurred while
attempting to write to output file.public void addSpectrum(String spectrumTitle, Spectrum spectrum) throws IOException
spectrumTitle
- The title of the spectrum to add.spectrum
- The spectrum to add.IOException
- Exception thrown if an error occurred while
attempting to write to output file.public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2021. All rights reserved.