Package org.archive.bdb

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


        InetAddress localhost = InetAddress.getLocalHost();
        CrawlHost crawlHost0 = new CrawlHost(localhost.getHostName());
        crawlHost0.setIP(localhost, 431243);

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

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


            RobotsDirectives da = rt.getDirectivesFor("a", false);
            RobotsDirectives db = rt.getDirectivesFor("b", false);
            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);
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.