java.lang.Object
com.compomics.util.experiment.io.biology.protein.iterators.HeaderIterator

public class HeaderIterator extends Object
Iterator for the headers of a FASTA file. Errors encountered during iteration are passed as runtime exceptions.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Details

    • HeaderIterator

      public HeaderIterator(File fastaFile) throws FileNotFoundException
      Constructor without sanity check.
      Parameters:
      fastaFile - the FASTA file
      Throws:
      FileNotFoundException - exception thrown if the file could not be found
  • Method Details

    • getNextHeader

      public String getNextHeader(WaitingHandler waitingHandler)
      Returns the next header.Null if none.
      Parameters:
      waitingHandler - the waiting handler
      Returns:
      the next header
    • close

      public void close()
      Closes the iterator.