package Reaction;

/**
 * This class uses a PairFileParser
 * to read the content of a pair file into a reaction object.
 * returns a reaction element.
 * This class is a member of the
 * <a href="{@docRoot}/../src/parser/PairFileParser/index.html">
 * Java Reader Framework</a>.
 *
 * @author OGUNDE KEHINDE
 * @see Pair.Pair
 * @see java.util.List
 * @see java.util.ArrayList
 * @since 1.7
 */
public class ReactionParser {
}

@@ -12,16 +12,153 @@
 ction;%0A%0A
+import Pair.Pair;%0Aimport Parser.PairFileParser;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0A%0A
 /**%0A * T
@@ -455,111 +455,1424 @@
 Pair
-.Pair%0A * @see java.util.List%0A * @see java.util.ArrayList%0A * @since 1.7%0A */%0Apublic class ReactionParser %7B
+%0A * @see Parser.PairFileParser%0A * @since 1.7%0A */%0Apublic class ReactionParser  extends PairFileParser %7B%0A%0A    /**%0A     * Create a reaction element%0A     */%0A    private Reaction reaction;%0A%0A    /**%0A     * Construct and accept a file to be parsed%0A     * throws a FileNotFoundException if file this not exist.%0A     *%0A     * @param file to be parsed%0A     * @throws FileNotFoundException if file does not exist%0A     */%0A    public ReactionParser(File file) throws FileNotFoundException %7B%0A        super(file);%0A        super.endOfBlock('/', '/');%0A        reaction = new Reaction();%0A    %7D%0A%0A    /**%0A     * Returns the next #Reaction element%0A     *%0A     * @return     the next #Reaction element, or %3Ccode%3Enull%3C/code%3E if the end of the%0A     *             stream is reached.%0A     * @exception  IOException  if this input stream has been closed by%0A     *             invoking its %7B@link Parser.PairFileParser#close()%7D method,%0A     *             or an I/O error occurs.%0A     * @see        java.io.FilterInputStream#in%0A     */%0A    public synchronized Reaction readReaction() throws IOException %7B%0A        Pair pair;%0A        Reaction reaction1 = null;%0A%0A        while ((pair = super.readPair('-')) != null)%7B%0A            if (super.isEndOfBlock())%7B%0A                reaction1 = reaction;%0A                reaction = new Reaction();%0A                break;%0A            %7D%0A%0A            reaction.add(pair);%0A        %7D%0A%0A        return reaction1;%0A    %7D
 %0A%7D%0A

Complete ReactionParser class