Class CmsFileWriter
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.cms.CmsFileWriter
- All Implemented Interfaces:
AutoCloseable
Writer for cms files.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpectrum(String spectrumTitle, Spectrum spectrum) Adds a spectrum to the file.voidclose()
-
Field Details
-
HEADER_LENGTH
public static final int HEADER_LENGTHThe length of the file header.
-
-
Constructor Details
-
CmsFileWriter
Constructor.- Parameters:
outputFile- the output file.- Throws:
FileNotFoundException- Exception thrown if the output file was not found.IOException- Exception thrown if an error occurred while attempting to write to output file.
-
-
Method Details
-
addSpectrum
Adds a spectrum to the file.- Parameters:
spectrumTitle- The title of the spectrum to add.spectrum- The spectrum to add.- Throws:
IOException- Exception thrown if an error occurred while attempting to write to output file.
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-