Class Ms2FileWriter
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.ms2.Ms2FileWriter
- All Implemented Interfaces:
AutoCloseable
This class writes spectrum files in MS2 format.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidWrites the header of the file.voidwriteSpectrum(Spectrum spectrum, int scanNumber) Writes the given spectrum in ms2 format.
-
Constructor Details
-
Ms2FileWriter
public Ms2FileWriter()Empty default constructor. -
Ms2FileWriter
Constructor.- Parameters:
destinationFile- The file where to write.
-
-
Method Details
-
writeHeader
public void writeHeader()Writes the header of the file. -
writeSpectrum
Writes the given spectrum in ms2 format.- Parameters:
spectrum- The spectrum to write.scanNumber- the scan number
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-