com.compomics.util.experiment.io
Class ExperimentIO

java.lang.Object
  extended by com.compomics.util.experiment.io.ExperimentIO

public class ExperimentIO
extends Object

This class takes care of the saving and opening of Compomics utilities experiment objects via serialization.

Author:
Marc Vaudel

Constructor Summary
ExperimentIO()
          Constructor
 
Method Summary
static MsExperiment loadExperiment(File utilitiesFile)
          Method which loads an experiment.
static void save(File file, MsExperiment experiment)
          Method which saves an experiment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentIO

public ExperimentIO()
Constructor

Method Detail

save

public static void save(File file,
                        MsExperiment experiment)
                 throws IOException
Method which saves an experiment.

Parameters:
file - The destination file
experiment - The experiment to be saved
Throws:
IOException - Exception thrown whenever an error is encountered while writing the file

loadExperiment

public static MsExperiment loadExperiment(File utilitiesFile)
                                   throws IOException,
                                          ClassNotFoundException
Method which loads an experiment.

Parameters:
utilitiesFile - File to import
Returns:
the loaded experiment
Throws:
IOException - Exception thrown if a problem occurred while reading the file
ClassNotFoundException - Exception thrown if a problem occurred while creating the experiment (typically a version issue)


Copyright © 2013. All Rights Reserved.