Example1: Read in a multi FASTA file

    /**
     * 
     * @throws IOException
     */
    @Test
    public final void testExample01() throws IOException {

        // Read a multi FASTA file element by element.

        final File file = new File("src/test/resources/fasta02.fasta");

        final FASTAFileReader reader = new FASTAFileReaderImpl(file);

        final FASTAElementIterator it = reader.getIterator();

        while (it.hasNext()) {
            final FASTAElement el = it.next();
            assertTrue(el.getHeader().contains("Homo sapiens spastin (SPAST)"));
        }
    }

Example2: Read in a multi FASTA file

    /**
     * 
     * @throws IOException
     */
    @Test
    public final void testNext() throws IOException {
        final String in = ">header" + UtilIO.NEW_LINE_STRING + "ATGC" + UtilIO.NEW_LINE_STRING + ">header2"
                + UtilIO.NEW_LINE_STRING + "ATGC";

        final FASTAElementIterator it = new FASTAFileReaderImpl(new StringReader(in)).getIterator();

        while (it.hasNext()) {
            assertEquals("ATGC", it.next().getSequence());
        }
    }