Package org.archive.bdb

Examples of org.archive.bdb.AutoKryo.readObject()


        ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
        kryo.writeObject(buffer, crawlHost0);
        buffer.flip();
       
        CrawlHost crawlHost1 = kryo.readObject(buffer, CrawlHost.class);

        TestCase.assertEquals(crawlHost0.getClass(), crawlHost1.getClass());
        TestCase.assertEquals(crawlHost0, crawlHost1);
        TestCase.assertEquals(localhost, crawlHost1.getIP());
    }
View Full Code Here


            assertTrue("user-agent a and b shares the same RobotsDirectives before serialization", da == db);
        }
        ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
        kryo.writeObject(buffer, rt);
        buffer.flip();
        Robotstxt rt2 = kryo.readObject(buffer, Robotstxt.class);
        assertNotNull(rt2);
        {
            RobotsDirectives da = rt2.getDirectivesFor("a", false);
            RobotsDirectives db = rt2.getDirectivesFor("b", false);
            assertTrue("user-agent a and b shares the same RobotsDirectives after deserialization", da == db);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.