Package com.fb2pdf.hadoop.OnDemandSAXParser

Examples of com.fb2pdf.hadoop.OnDemandSAXParser.StringPair


    @Test(expected=IOException.class)
    public void testBroken() throws IOException
    {
        FileInputStream fs = new FileInputStream("test_data/broken_fictionbook_2_1.fb2");
        OnDemandSAXParser p = new OnDemandSAXParser(fs);
        StringPair n;
        while((n = p.getNext()) != null)
        {
            assertNotNull(n.a);
            assertNotNull(n.b);
        }
View Full Code Here


     */
    public void testOnDemand() throws IOException
    {
        FileInputStream fs = new FileInputStream("test_data/broken_fictionbook_2_1.fb2");
        OnDemandSAXParser p = new OnDemandSAXParser(fs);
        StringPair n= p.getNext();
        assertNotNull(n);
        p.stop();
    }
View Full Code Here

    @Test
    public void testGood() throws IOException
    {
        FileInputStream fs = new FileInputStream("test_data/fictionbook_2_1.fb2");
        OnDemandSAXParser p = new OnDemandSAXParser(fs);
        StringPair n;
        int i = 0;
        while((n = p.getNext()) != null)
        {
            i++;
            assertNotNull(n.a);
View Full Code Here

    }

    @Override
    public boolean next(Text key, Text value) throws IOException
    {
        StringPair n = parser.getNext();
        if(n != null)
        {
            if (stopElement != null && n.a != null)
            {
                if (!stopElementFound)
View Full Code Here

TOP

Related Classes of com.fb2pdf.hadoop.OnDemandSAXParser.StringPair

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.