java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.cms.CmsFileWriter
All Implemented Interfaces:
AutoCloseable

public class CmsFileWriter extends Object implements AutoCloseable
Writer for cms files.
Author:
Marc Vaudel, Harald Barsnes
  • Field Details

    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      The length of the file header.
  • Constructor Details

  • Method Details

    • addSpectrum

      public void addSpectrum(String spectrumTitle, Spectrum spectrum) throws IOException
      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

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException